docker-compose-dev.yml 1.1 KB

123456789101112131415161718192021222324252627282930313233
  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_PROFILES_ACTIVE=dev
  12. - SPRING_DATASOURCE_DYNAMIC_DATASOURCE_MASTER_URL=jdbc:mysql://mysql:3306/tl?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&autoReconnect=true&failOverReadOnly=false
  13. # - MQTT-SERVER=tcp://172.28.175.70:1883
  14. ports:
  15. - 8001:8080
  16. networks:
  17. - dockertest_bx_default
  18. # deploy: #限制资源使用
  19. # resources:
  20. # limits:
  21. # cpus: '0.50'
  22. # memory: 2048M
  23. labels:
  24. - "traefik.http.routers.tl_api.rule=Host(`test.tl.web.yingcaibx.com`) && PathPrefix(`/api`)"
  25. - "traefik.http.routers.tl_api.middlewares=tl_api-stripprefix"
  26. - "traefik.http.middlewares.tl_api-stripprefix.stripprefix.prefixes=/api"
  27. - "traefik.http.routers.tl_api.entrypoints=websecure"
  28. - "traefik.http.routers.tl_api.tls.certresolver=yxt"
  29. networks:
  30. dockertest_bx_default:
  31. external: true