File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -70,11 +70,18 @@ services:
7070 retries : 3
7171 start_period : 30s
7272 labels :
73- - " traefik.enable=true"
74- - " traefik.http.routers.gateway.rule=Host(`${SERVER_HOST}`)"
73+ # Route 1: API direct domain (api........io)
74+ - " traefik.http.routers.gateway-api.rule=Host(`${SERVER_HOST}`)"
75+ - " traefik.http.routers.gateway-api.entrypoints=websecure"
76+ - " traefik.http.routers.gateway-api.tls.certresolver=letsencrypt"
77+ - " traefik.http.routers.gateway-api.service=gateway"
78+ # Route 2: API on the client domain
79+ - " traefik.http.routers.gateway-client.rule=Host(`${CLIENT_HOST}`) && PathPrefix(`/api`)"
80+ - " traefik.http.routers.gateway-client.entrypoints=websecure"
81+ - " traefik.http.routers.gateway-client.tls.certresolver=letsencrypt"
82+ - " traefik.http.routers.gateway-client.service=gateway"
83+ # Service config:
7584 - " traefik.http.services.gateway.loadbalancer.server.port=${SERVER_PORT_GATEWAY}"
76- - " traefik.http.routers.gateway.entrypoints=websecure"
77- - " traefik.http.routers.gateway.tls.certresolver=letsencrypt"
7885 networks :
7986 - app-network
8087 user-service :
You can’t perform that action at this time.
0 commit comments