docker-compose.yml 691 B

1234567891011121314151617181920212223242526272829
  1. services:
  2. #注册发现服务 - 集群
  3. consul_node:
  4. image: consul:${consul_version}
  5. ports:
  6. - "8500:8500"
  7. - "8600:8600/udp"
  8. container_name: consul
  9. volumes:
  10. - "./data/consul:/data"
  11. restart: always
  12. springboot:
  13. image: lianshufeng/springboot:jdk17
  14. ports:
  15. - "8080:8080"
  16. volumes:
  17. - "./:/opt/jar"
  18. working_dir: /opt/jar
  19. container_name: app
  20. restart: always
  21. environment:
  22. - UpdateResources=http://192.168.0.28:8080/BuildHelper-0.0.1-SNAPSHOT.jar
  23. command: nohup java -Dfile.encoding=UTF-8 -Xmx500m -Xms300m -Duser.timezone=GMT+8 -Dspring.profiles.active=dev -jar app.jar
  24. depends_on:
  25. - consul_node