-
Notifications
You must be signed in to change notification settings - Fork 12
/
docker-compose.yml
64 lines (64 loc) · 1.99 KB
/
docker-compose.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
58
59
60
61
62
63
64
version: "3.8"
services:
reverse-proxy:
image: traefik:v2.10
command:
- "--providers.docker"
- "--providers.file.directory=/configuration/"
- "--entrypoints.web.address=:80"
- "--entrypoints.web.http.redirections.entryPoint.to=websecure"
- "--entrypoints.web.http.redirections.entryPoint.scheme=https"
- "--entrypoints.web.http.redirections.entrypoint.permanent=true"
- "--entrypoints.websecure.address=:443"
labels:
- "traefik.http.middlewares.secureHeaders.headers.stsSeconds=31536000"
- "traefik.http.middlewares.secureHeaders.headers.forceSTSHeader=true"
environment:
- SSL_CERT_CRT=${SSL_CERT_CRT}
- SSL_CERT_KEY=${SSL_CERT_KEY}
ports:
- "80:80"
- "443:443"
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./traefik.yaml:/configuration/traefik.yml
- /etc/ssl:/etc/ssl
frontend:
build: ./frontend
labels:
- "traefik.http.routers.frontend.tls=true"
- "traefik.http.routers.frontend.rule=PathPrefix(`/`)"
- "traefik.http.routers.frontend.middlewares=secureHeaders@docker"
restart: unless-stopped
backend:
build: ./backend
depends_on:
- database
env_file: secrets/.env
environment:
MODULE_NAME: ccfatigue.main
FORWARDED_ALLOW_IPS: "*"
CORS_ENABLED: "true"
POSTGRES_HOST: database
ROOT_PATH: /api
DATA_PATH: /Data
labels:
- "traefik.http.routers.backend.tls=true"
- "traefik.http.routers.backend.rule=PathPrefix(`/api`)"
- "traefik.http.routers.backend.middlewares=secureHeaders@docker,backend-stripprefix"
- "traefik.http.middlewares.backend-stripprefix.stripprefix.prefixes=/api"
restart: unless-stopped
volumes:
- ./Data:/Data:ro
database:
image: postgres:14-alpine
ports:
- "5432:5432"
env_file:
- ./secrets/.env
restart: unless-stopped
volumes:
- database:/var/lib/postgresql/data
volumes:
database: {}