-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
49 lines (46 loc) · 1.41 KB
/
docker-compose.yaml
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
services:
caddy:
image: lucaslorentz/caddy-docker-proxy:2.9
ports:
- 80:80
- 443:443
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- caddy-data:/data
- caddy-config:/config
networks:
- caddy
labels:
caddy_0.email: ${CERT_EMAIL}
backend:
image: "${DOCKER_IMAGE_BACKEND?Variable not set}:${TAG-latest}"
restart: always
networks:
- caddy
command: ["fastapi", "run", "--host", "0.0.0.0", "--port", "8000", "--proxy-headers", "app/main.py"]
env_file:
- .env
environment:
- DOMAIN=${API_DOMAIN}
- ENVIRONMENT=${NODE_ENV}
- BACKEND_CORS_ORIGINS=${BACKEND_CORS_ORIGINS}
- SENTRY_DSN_BACKEND=${SENTRY_DSN_BACKEND}
- SQLITE_DATABASE_PATH=${SQLITE_DATABASE_PATH}
volumes:
- ./backend/data/tmvis.db:/app/data/tmvis.db:ro
build:
context: .
dockerfile: backend.Dockerfile
args:
INSTALL_DEV: false
platform: linux/amd64
labels:
caddy_0: ${API_DOMAIN?Variable not set}, www.${API_DOMAIN?Variable not set}
caddy_0.reverse_proxy_0: "{{upstreams 8000}}"
volumes:
caddy-data:
caddy-config:
networks:
caddy:
external: false