-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.dev.yml
41 lines (40 loc) · 1.09 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
version: "3.11"
services:
web:
image: "ghcr.io/hotosm/website/backend:${TAG_OVERRIDE:-debug}"
build:
context: .
dockerfile: Dockerfile
target: debug
args:
APP_VERSION: "${TAG_OVERRIDE:-main}"
volumes:
- .:/app # Mount the codebase for development
- /app/frontend/dist/css # Mount only the necessary directory for live reload
- /app/frontend/node_modules
- /app/*/templates # Mount Django templates directory
ports:
- 8000:8000
env_file:
- .env
depends_on:
db:
condition: service_healthy
db:
image: "docker.io/postgres:${POSTGRES_TAG:-16-alpine3.18}"
env_file:
- .env
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD:-postgres}
POSTGRES_DB: ${DB_NAME:-postgres}
POSTGRES_USER: ${DB_USER:-postgres}
volumes:
- postgres_data:/var/lib/postgresql/data/
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-postgres} -d ${DB_NAME:-postgres}"]
start_period: 5s
interval: 10s
timeout: 5s
retries: 3
volumes:
postgres_data: