docker-compose.yml 891 B

123456789101112131415161718192021222324252627
  1. version: '3.9'
  2. services:
  3. mysql:
  4. image: registry.cn-hangzhou.aliyuncs.com/mindskip/mysql:8.0.33
  5. restart: always
  6. ports:
  7. - 127.0.0.1:3306:3306
  8. privileged: true
  9. container_name: xzs-mysql
  10. environment:
  11. MYSQL_ROOT_PASSWORD: "123456"
  12. TZ: "Asia/Shanghai"
  13. volumes:
  14. - "./sql:/docker-entrypoint-initdb.d/"
  15. java:
  16. image: registry.cn-hangzhou.aliyuncs.com/mindskip/java:1.8.0
  17. container_name: xzs-java
  18. privileged: true
  19. network_mode: host
  20. restart: always
  21. command:
  22. /bin/bash -c "java -Duser.timezone=Asia/Shanghai -jar -Dspring.profiles.active=prod /usr/local/xzs/release/xzs-3.9.0.jar"
  23. ports:
  24. - 8000:8000
  25. volumes:
  26. - "./release:/usr/local/xzs/release/"
  27. - "./log:/usr/log/xzs/"