-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.dev.yml
92 lines (86 loc) · 2.15 KB
/
docker-compose.dev.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
services:
reverse-proxy:
image: traefik:v3.1
command:
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
ports:
- "80:80"
- "4080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
frontend:
build:
context: ./frontend
dockerfile: ./Dockerfile
labels:
- "traefik.enable=true"
- "traefik.http.routers.spacefest_frontend.rule=Host(`spacechamp.localhost`)"
- "traefik.http.services.spacefest_frontend.loadBalancer.server.port=80"
depends_on:
- backend
backend:
build:
context: ./backend
dockerfile: ./Dockerfile
command:
- "--db-url"
- "postgresql://postgres:postgres@postgres:5432/spacechamp"
- "--addr"
- "0.0.0.0:80"
- "--sessions-path"
- "/var/lib/backend/sessions.json"
- "--notisend-token"
- "$NOTISEND_TOKEN"
environment:
- NOTISEND_TOKEN=${NOTISEND_TOKEN}
volumes:
- "backend-data:/var/lib/backend"
ports:
- 8833:80
networks:
- postgres
labels:
- "traefik.enable=true"
- "traefik.http.routers.spacefest_backend.rule=Host(`spacechamp.localhost`) && PathPrefix(`/api/v1`)"
- "traefik.http.services.spacefest_backend.loadBalancer.server.port=80"
depends_on:
# report-generator
postgres:
condition: service_healthy
report-generator:
build:
context: ./report-generator
dockerfile: ./Dockerfile
command:
- "--host"
- "0.0.0.0"
- "--port"
- "80"
ports:
- 8866:80
postgres:
image: postgres:latest
user: postgres
environment:
POSTGRES_DB: "spacechamp"
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "postgres"
PGDATA: "/var/lib/postgresql/data/pgdata"
volumes:
- "spacechamp-postgres-data:/var/lib/postgresql/data"
networks:
- postgres
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 2s
timeout: 2s
retries: 10
restart: unless-stopped
networks:
postgres:
volumes:
backend-data:
spacechamp-postgres-data:
external: true