-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.traefik.yaml
More file actions
40 lines (37 loc) · 1.69 KB
/
Copy pathcompose.traefik.yaml
File metadata and controls
40 lines (37 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
include:
- compose.volumes.yaml
services:
web-app:
extends:
file: compose.base.yaml
service: web-app-base
hostname: react-nextjs-fastify-example-web-app
networks:
- proxy
environment:
- API_BASE_URL=${API_BASE_URL:-https://react-nextjs-fastify-example.docker.localhost/api}
labels:
- "traefik.enable=true"
- "traefik.http.middlewares.${COMPOSE_PROJECT_NAME}-web-app-web-redirectscheme.redirectscheme.scheme=https"
- "traefik.http.middlewares.${COMPOSE_PROJECT_NAME}-web-app-web-redirectscheme.redirectscheme.permanent=false"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-web-app-web.rule=Host(`${APP_HOSTNAME:-react-nextjs-fastify-example.docker.localhost}`) && !PathPrefix(`/api`)"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-web-app-web.middlewares=${COMPOSE_PROJECT_NAME}-web-app-web-redirectscheme"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-web-app-websecure.rule=Host(`${APP_HOSTNAME:-react-nextjs-fastify-example.docker.localhost}`) && !PathPrefix(`/api`)"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-web-app-websecure.tls=true"
api:
extends:
file: compose.base.yaml
service: api-base
hostname: react-nextjs-fastify-example-api
networks:
- proxy
environment:
- API_ROUTE_PREFIX=${API_ROUTE_PREFIX:-/api}
labels:
- "traefik.enable=true"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-api-websecure.rule=Host(`${API_HOSTNAME:-react-nextjs-fastify-example.docker.localhost}`) && PathPrefix(`/api`)"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-api-websecure.tls=true"
networks:
proxy:
name: ${DOCKER_PROXY_NETWORK:-proxy}
external: true