docker-compose-pre.yml 995 B

123456789101112131415161718192021222324252627
  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=pre
  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. ports:
  14. - 8080:8080
  15. networks:
  16. - dockertest_bx_default
  17. labels:
  18. - "traefik.http.routers.tl_api.rule=Host(`test.tl.web.yingcaibx.com`) && PathPrefix(`/api`)"
  19. - "traefik.http.routers.tl_api.middlewares=tl_api-stripprefix"
  20. - "traefik.http.middlewares.tl_api-stripprefix.stripprefix.prefixes=/api"
  21. - "traefik.http.routers.tl_api.entrypoints=websecure"
  22. - "traefik.http.routers.tl_api.tls.certresolver=yxt"
  23. networks:
  24. dockertest_bx_default:
  25. external: true