-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
68 lines (64 loc) · 1.71 KB
/
Copy pathdocker-compose.yml
File metadata and controls
68 lines (64 loc) · 1.71 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
version: '3.8'
services:
postgres:
image: postgres:15-alpine
container_name: netpatch_postgres
environment:
- POSTGRES_USER=netpatch_user
- POSTGRES_PASSWORD=netpatch_password
- POSTGRES_DB=netpatch_db
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U netpatch_user -d netpatch_db"]
interval: 5s
timeout: 5s
retries: 5
volumes:
- postgres_data:/var/lib/postgresql/data
neo4j:
image: neo4j:5.12.0-community
container_name: netpatch_neo4j
ports:
- "7474:7474" # HTTP Dashboard
- "7687:7687" # Bolt connection
environment:
- NEO4J_AUTH=neo4j/password
healthcheck:
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:7474 || exit 1"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
volumes:
- neo4j_data:/data
- neo4j_logs:/logs
web:
build: .
container_name: netpatch_web
command: >
sh -c "python manage.py migrate &&
python manage.py seed_db &&
python manage.py build_game_dicts &&
python manage.py runserver 0.0.0.0:8000"
ports:
- "8000:8000"
depends_on:
postgres:
condition: service_healthy
neo4j:
condition: service_healthy
environment:
- DJANGO_DEBUG=True
- DJANGO_ENV=development
- DJANGO_SECRET_KEY=local_development_secret_key_12345
- DATABASE_URL=postgresql://netpatch_user:netpatch_password@postgres:5432/netpatch_db
- NEO4J_URI=bolt://neo4j:7687
- NEO4J_USERNAME=neo4j
- NEO4J_PASSWORD=password
volumes:
- .:/app
volumes:
postgres_data:
neo4j_data:
neo4j_logs: