docker-compose.yml 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. version: '3'
  2. services:
  3. tl_api:
  4. build:
  5. context: .
  6. dockerfile: ./Dockerfile
  7. image: registry.yingcaibx.com/tl/api:latest
  8. restart: always
  9. container_name: tl_api
  10. environment:
  11. - SPRING_DATASOURCE_DYNAMIC_DATASOURCE_MASTER_URL=jdbc:mysql://172.28.175.70:3306/tl?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true
  12. - SPRING-REDIS-HOST=219.153.208.35
  13. - SPRING-REDIS-PASSWORD=huHJMucfC!tJ59Ri
  14. - MQTT-SERVER=tcp://172.28.175.70:1883
  15. networks:
  16. - docker_networks_default
  17. deploy: #限制资源使用
  18. resources:
  19. limits:
  20. cpus: '0.50'
  21. memory: 2048M
  22. labels:
  23. - "traefik.http.routers.tl_api.rule=Host(`test.tl.web.yingcaibx.com`) && PathPrefix(`/api`)"
  24. - "traefik.http.routers.tl_api.middlewares=tl_api-stripprefix"
  25. - "traefik.http.middlewares.tl_api-stripprefix.stripprefix.prefixes=/api"
  26. - "traefik.http.routers.tl_api.entrypoints=websecure"
  27. - "traefik.http.routers.tl_api.tls.certresolver=yxt"
  28. networks:
  29. docker_networks_default:
  30. external: true