forked from hotosm/fAIr
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
56 lines (52 loc) · 1.21 KB
/
docker-compose.yml
File metadata and controls
56 lines (52 loc) · 1.21 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
services:
postgres:
image: postgis/postgis:17-3.5-alpine
environment:
POSTGRES_USER: ${POSTGRES_USER:-admin}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-password}
POSTGRES_DB: ${POSTGRES_DB:-fair}
ports:
- "${POSTGRES_PORT:-5434}:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "${POSTGRES_USER:-admin}"]
interval: 5s
timeout: 3s
retries: 10
api:
build:
context: ./backend
env_file:
- ./backend/.env
ports:
- "${API_PORT:-8000}:8000"
depends_on:
postgres:
condition: service_healthy
volumes:
- ./backend:/app
command: ["python", "manage.py", "runserver", "0.0.0.0:8000"]
worker:
build:
context: ./backend
env_file:
- ./backend/.env
depends_on:
postgres:
condition: service_healthy
volumes:
- ./backend:/app
command: ["python", "manage.py", "db_worker"]
frontend:
profiles: ["dev"]
build:
context: ./frontend
dockerfile: Dockerfile.dev
ports:
- "${FRONTEND_PORT:-3500}:3000"
volumes:
- ./frontend:/app
- /app/node_modules
volumes:
postgres_data: