File tree Expand file tree Collapse file tree 1 file changed +20
-3
lines changed
Expand file tree Collapse file tree 1 file changed +20
-3
lines changed Original file line number Diff line number Diff 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 :
You can’t perform that action at this time.
0 commit comments