-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
72 lines (68 loc) · 1.88 KB
/
docker-compose.yaml
File metadata and controls
72 lines (68 loc) · 1.88 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
services:
traefik:
image: traefik:v3
command:
- "--api.insecure=false"
- "--api.dashboard=true"
- "--log.level=DEBUG"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
ports:
- "80:80"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- web
healthcheck:
test: ["CMD", "traefik", "healthcheck", "--ping"]
interval: 10s
timeout: 5s
retries: 3
start_period: 10s
postgres:
extends:
file: ./backend/docker-compose.yaml
service: postgres
networks:
- web
backend:
extends:
file: ./backend/docker-compose.yaml
service: backend
environment:
- DATABASE_URL=${DOCKER_DATABASE_URL}
- SERVER_HOST=${SERVER_HOST}
- SERVER_PORT=${SERVER_PORT}
- JWT_SECRET=${JWT_SECRET}
- JWT_EXPIRY=${JWT_EXPIRY}
- REFRESH_EXPIRY=${REFRESH_EXPIRY}
networks:
- web
labels:
- "traefik.enable=true"
- "traefik.docker.network=web"
- "traefik.http.routers.backend.rule=PathPrefix(`/api`) || PathPrefix(`/swagger-ui/`) || PathPrefix(`/api-docs/`)"
- "traefik.http.routers.backend.entrypoints=web"
- "traefik.http.services.backend.loadbalancer.server.port=${SERVER_PORT}"
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
args:
- VITE_MAPBOX_API_KEY=${VITE_MAPBOX_API_KEY}
- VITE_API_URL=http://${DOMAIN}:39387
networks:
- web
labels:
- "traefik.enable=true"
- "traefik.http.routers.frontend.rule=Host(`${DOMAIN}`)"
- "traefik.http.routers.frontend.entrypoints=web"
- "traefik.http.services.frontend.loadbalancer.server.port=80"
volumes:
postgres_data:
networks:
web:
driver: bridge