-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose-production.yml
57 lines (50 loc) · 1.9 KB
/
compose-production.yml
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
version: "3.9"
services:
traefik:
image: traefik:v2.5
command:
- --api.insecure=true
- --providers.docker=true
- --providers.docker.exposedbydefault=false
- --entrypoints.web.address=:80
- --entryPoints.web.forwardedHeaders.trustedIPs=0.0.0.0/0
- --entryPoints.web.forwardedHeaders.insecure
ports:
- "${PORT}:80"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
backend:
restart: always
labels:
- "traefik.enable=true"
- "traefik.http.routers.backend.rule=PathPrefix(`/api`)"
- "traefik.http.routers.backend.entrypoints=web"
- "traefik.http.services.backend.loadbalancer.server.port=80"
- "traefik.frontend.headers.SSLProxyHeaders=X-Forwarded-Proto: https"
# sticky session
- "traefik.http.services.backend.loadbalancer.sticky=true"
# cors credentials
environment:
PORT: 80
CONTEXT_PATH: /api
JDBC_DATABASE_URL: ${POSTGRES_URL}
JDBC_DATABASE_USERNAME: ${POSTGRES_USER}
JDBC_DATABASE_PASSWORD: ${POSTGRES_PASSWORD}
CLIENT_ID: ${CLIENT_ID}
CLIENT_SECRET: ${CLIENT_SECRET}
COOKIE_SAMESITE: ${COOKIE_SAMESITE}
extra_hosts:
- "host.docker.internal:host-gateway"
build: backend
deploy:
replicas: 5
restart_policy:
condition: on-failure
frontend:
labels:
- "traefik.enable=true"
- "traefik.http.routers.frontend.rule=PathPrefix(`/`)"
- "traefik.http.routers.frontend.entrypoints=web"
- "traefik.http.services.frontend.loadbalancer.server.port=80"
- "traefik.frontend.headers.SSLProxyHeaders=X-Forwarded-Proto: https"
build: frontend