-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
54 lines (50 loc) · 1.39 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
50
51
52
53
54
version: "3.8"
services:
db:
image: postgres:16-alpine
volumes:
- ./data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=excalidraw-refined
- POSTGRES_USER=excalidraw-refined
- POSTGRES_PASSWORD=excalidraw-refined
ports:
- "15432:5432"
healthcheck:
test: [ "CMD", "pg_isready", "-U", "excalidraw-refined" ]
frontend:
image: ghcr.io/iamshobe/excalidraw-refined_frontend:latest
run-migrations:
image: ghcr.io/iamshobe/excalidraw-refined_backend:latest
environment:
- DB_URL=postgresql://excalidraw-refined:excalidraw-refined@db:5432/excalidraw-refined
entrypoint: [ "alembic", "upgrade", "head" ]
depends_on:
db:
condition: service_healthy
backend:
image: ghcr.io/iamshobe/excalidraw-refined_backend:latest
environment:
- DB_URL=postgresql://excalidraw-refined:excalidraw-refined@db:5432/excalidraw-refined
command:
- --host
- "0.0.0.0"
- --port
- "8080"
depends_on:
db:
condition: service_healthy
run-migrations:
condition: service_completed_successfully
nginx:
image: nginx:alpine
ports:
- "80:80"
volumes:
- ./config/nginx/default.conf.template:/etc/nginx/templates/default.conf.template:ro
environment:
- FRONTEND_PORT=80
- BACKEND_PORT=8080
depends_on:
- frontend
- backend