Skip to content

Commit 3bd2204

Browse files
committed
vibe coded update to docker-compose.yml
1 parent d534d9a commit 3bd2204

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

docker-compose.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,33 @@ services:
1010
- ./src:/app
1111
ports:
1212
- "8000:8000"
13+
depends_on:
14+
postgres:
15+
condition: service_healthy
16+
s3proxy:
17+
condition: service_started
18+
mailpit:
19+
condition: service_started
1320
# for development only, to make sure the server reloads when the code changes
1421
command: python manage.py runserver 0.0.0.0:8000
1522

1623
postgres:
1724
image: postgres:16
1825
restart: unless-stopped
1926
volumes:
20-
- ./data/pgdata:/var/lib/postgresql/data
27+
- postgres_data:/var/lib/postgresql/data
2128
environment:
2229
# this matches the values in the env.sample file
2330
POSTGRES_DB: django_reference
2431
POSTGRES_USER: postgres
2532
POSTGRES_PASSWORD: pass123
2633
ports:
2734
- "5432:5432"
35+
healthcheck:
36+
test: ["CMD-SHELL", "pg_isready -U postgres"]
37+
interval: 10s
38+
timeout: 5s
39+
retries: 5
2840

2941
s3proxy:
3042
restart: unless-stopped
@@ -33,7 +45,7 @@ services:
3345
ports:
3446
- "9000:80"
3547
volumes:
36-
- ./data/s3proxy:/data
48+
- s3proxy_data:/data
3749
environment:
3850
S3PROXY_AUTHORIZATION: none
3951
S3PROXY_STORAGE: filesystem
@@ -43,7 +55,7 @@ services:
4355
image: axllent/mailpit
4456
restart: unless-stopped
4557
volumes:
46-
- ./data/mailpit:/data
58+
- mailpit_data:/data
4759
ports:
4860
- 8025:8025
4961
- 1025:1025
@@ -64,3 +76,8 @@ services:
6476
- ./src:/app
6577
depends_on:
6678
- postgres
79+
80+
volumes:
81+
postgres_data:
82+
s3proxy_data:
83+
mailpit_data:

0 commit comments

Comments
 (0)