docker-compose-server.yml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #### 镜像上传
  2. # 仓库私服: 81.70.17.111:5000
  3. # 第一步:上传镜像到docker仓库
  4. #docker tag jeecg-boot-mysql 81.70.17.111:5000/jeecg-boot-mysql:1.1
  5. #docker tag jeecg-boot-system 81.70.17.111:5000/jeecg-boot-system:1.0
  6. #docker tag nginxhtml:jeecgboot 81.70.17.111:5000/nginxhtml:1.2
  7. #docker push 81.70.17.111:5000/jeecg-boot-mysql:1.1
  8. #docker push 81.70.17.111:5000/jeecg-boot-system:1.0
  9. #docker push 81.70.17.111:5000/nginxhtml:1.2
  10. # 第二步:将此yml文件上传服务器,执行启动命令 docker-compose -f ./docker-compose-server.yml up
  11. version: '2'
  12. services:
  13. jeecg-boot-mysql:
  14. image: 81.70.17.111:5000/jeecg-boot-mysql:1.0
  15. environment:
  16. MYSQL_ROOT_PASSWORD: root
  17. restart: always
  18. container_name: jeecg-boot-mysql
  19. command:
  20. --character-set-server=utf8mb4
  21. --collation-server=utf8mb4_general_ci
  22. --explicit_defaults_for_timestamp=true
  23. --lower_case_table_names=1
  24. --max_allowed_packet=128M
  25. ports:
  26. - 3306:3306
  27. jeecg-boot-redis:
  28. image: redis:5.0
  29. ports:
  30. - 6379:6379
  31. restart: always
  32. container_name: jeecg-boot-redis
  33. jeecg-boot-system:
  34. image: 81.70.17.111:5000/jeecg-boot-system:1.0
  35. restart: always
  36. container_name: jeecg-boot-system
  37. volumes:
  38. - /data/config:/jeecg-boot/config
  39. ports:
  40. - 8080:8080
  41. jeecg-boot-nginx:
  42. image: 81.70.17.111:5000/nginxhtml
  43. restart: always
  44. container_name: jeecg-boot-nginx
  45. ports:
  46. - 80:80