@@ -25,17 +25,17 @@ services:
2525 - traefik.docker.network=traefik
2626
2727 # --- Traefik Router (Frontend) ---
28- - traefik.http.routers.jobpt-web.rule=Host(`${APP_HOST}`)
29- - traefik.http.routers.jobpt-web.entrypoints=websecure
30- - traefik.http.routers.jobpt-web.tls=true
31- - traefik.http.routers.jobpt-web.tls.certresolver=le
32- - traefik.http.services.jobpt-web.loadbalancer.server.port=3000
28+ - traefik.http.routers.jobpt-${ENVIRONMENT}- web.rule=Host(`${APP_HOST}`)
29+ - traefik.http.routers.jobpt-${ENVIRONMENT}- web.entrypoints=websecure
30+ - traefik.http.routers.jobpt-${ENVIRONMENT}- web.tls=true
31+ - traefik.http.routers.jobpt-${ENVIRONMENT}- web.tls.certresolver=le
32+ - traefik.http.services.jobpt-${ENVIRONMENT}- web.loadbalancer.server.port=3000
3333
3434 # --- HTTP → HTTPS 리다이렉트 ---
35- - traefik.http.routers.jobpt-web-http.rule=Host(`${APP_HOST}`)
36- - traefik.http.routers.jobpt-web-http.entrypoints=web
37- - traefik.http.routers.jobpt-web-http.middlewares=redirect-to-https@file
38- - traefik.http.routers.jobpt-web-http.service=jobpt-web
35+ - traefik.http.routers.jobpt-${ENVIRONMENT}- web-http.rule=Host(`${APP_HOST}`)
36+ - traefik.http.routers.jobpt-${ENVIRONMENT}- web-http.entrypoints=web
37+ - traefik.http.routers.jobpt-${ENVIRONMENT}- web-http.middlewares=redirect-to-https@file
38+ - traefik.http.routers.jobpt-${ENVIRONMENT}- web-http.service=jobpt-${ENVIRONMENT} -web
3939
4040 backend :
4141 build :
@@ -66,28 +66,28 @@ services:
6666 - traefik.docker.network=traefik
6767
6868 # --- Traefik Router (Backend /api) ---
69- - traefik.http.routers.jobpt-api.rule=Host(`${APP_HOST}`) && PathPrefix(`/api`)
70- - traefik.http.routers.jobpt-api.entrypoints=websecure
71- - traefik.http.routers.jobpt-api.tls=true
72- - traefik.http.routers.jobpt-api.tls.certresolver=le
73- - traefik.http.services.jobpt-api.loadbalancer.server.port=8000
69+ - traefik.http.routers.jobpt-${ENVIRONMENT}- api.rule=Host(`${APP_HOST}`) && PathPrefix(`/api`)
70+ - traefik.http.routers.jobpt-${ENVIRONMENT}- api.entrypoints=websecure
71+ - traefik.http.routers.jobpt-${ENVIRONMENT}- api.tls=true
72+ - traefik.http.routers.jobpt-${ENVIRONMENT}- api.tls.certresolver=le
73+ - traefik.http.services.jobpt-${ENVIRONMENT}- api.loadbalancer.server.port=8000
7474
7575 # FastAPI Docs router
76- - traefik.http.routers.jobpt-api-docs.rule=Host(`${APP_HOST}`) && (PathPrefix(`/docs`) || PathPrefix(`/redoc`) || PathPrefix(`/openapi.json`))
77- - traefik.http.routers.jobpt-api-docs.entrypoints=websecure
78- - traefik.http.routers.jobpt-api-docs.tls=true
79- - traefik.http.routers.jobpt-api-docs.tls.certresolver=le
80- - traefik.http.routers.jobpt-api-docs.service=jobpt-api
76+ - traefik.http.routers.jobpt-${ENVIRONMENT}- api-docs.rule=Host(`${APP_HOST}`) && (PathPrefix(`/docs`) || PathPrefix(`/redoc`) || PathPrefix(`/openapi.json`))
77+ - traefik.http.routers.jobpt-${ENVIRONMENT}- api-docs.entrypoints=websecure
78+ - traefik.http.routers.jobpt-${ENVIRONMENT}- api-docs.tls=true
79+ - traefik.http.routers.jobpt-${ENVIRONMENT}- api-docs.tls.certresolver=le
80+ - traefik.http.routers.jobpt-${ENVIRONMENT}- api-docs.service=jobpt-${ENVIRONMENT} -api
8181
8282 # /api prefix 제거 미들웨어 연결
83- - traefik.http.middlewares.jobpt-api-stripprefix.stripprefix.prefixes=/api
84- - traefik.http.routers.jobpt-api.middlewares=jobpt-api-stripprefix
83+ - traefik.http.middlewares.jobpt-${ENVIRONMENT}- api-stripprefix.stripprefix.prefixes=/api
84+ - traefik.http.routers.jobpt-${ENVIRONMENT}- api.middlewares=jobpt-${ENVIRONMENT} -api-stripprefix
8585
8686 # HTTP → HTTPS 리다이렉트 (Backend)
87- - traefik.http.routers.jobpt-api-http.rule=Host(`${APP_HOST}`) && PathPrefix(`/api`)
88- - traefik.http.routers.jobpt-api-http.entrypoints=web
89- - traefik.http.routers.jobpt-api-http.middlewares=redirect-to-https@file
90- - traefik.http.routers.jobpt-api-http.service=jobpt-api
87+ - traefik.http.routers.jobpt-${ENVIRONMENT}- api-http.rule=Host(`${APP_HOST}`) && PathPrefix(`/api`)
88+ - traefik.http.routers.jobpt-${ENVIRONMENT}- api-http.entrypoints=web
89+ - traefik.http.routers.jobpt-${ENVIRONMENT}- api-http.middlewares=redirect-to-https@file
90+ - traefik.http.routers.jobpt-${ENVIRONMENT}- api-http.service=jobpt-${ENVIRONMENT} -api
9191
9292networks :
9393 traefik :
0 commit comments