@@ -13,8 +13,8 @@ services:
1313 environment :
1414 - REDIS_URL=redis://redis:6379/0
1515 depends_on :
16- db : {"condition": "service_healthy"}
17- redis : {"condition": "service_healthy"}
16+ db : { "condition": "service_healthy" }
17+ redis : { "condition": "service_healthy" }
1818 restart : " no"
1919
2020 web :
@@ -27,9 +27,9 @@ services:
2727 ports :
2828 - " 8000:8000"
2929 depends_on :
30- db : {"condition": "service_healthy"}
31- redis : {"condition": "service_healthy"}
32- init : {"condition": "service_completed_successfully"}
30+ db : { "condition": "service_healthy" }
31+ redis : { "condition": "service_healthy" }
32+ init : { "condition": "service_completed_successfully" }
3333
3434 worker :
3535 build :
@@ -41,22 +41,24 @@ services:
4141 C_FORCE_ROOT : " true"
4242 REDIS_URL : " redis://redis:6379/0"
4343 depends_on :
44- db : {"condition": "service_healthy"}
45- redis : {"condition": "service_healthy"}
46- init : {"condition": "service_completed_successfully"}
44+ db : { "condition": "service_healthy" }
45+ redis : { "condition": "service_healthy" }
46+ init : { "condition": "service_completed_successfully" }
4747
4848 test :
49- build :
50- context : .
51- dockerfile : Containerfile
52- command : python3 manage.py test .
49+ image : shareabouts-api
50+ command : pytest
5351 env_file : .env
5452 environment :
5553 - REDIS_URL=redis://redis:6379/0
54+ volumes :
55+ - ./htmlcov:/app/htmlcov
56+ - ./src:/app
57+ - ./pytest.ini:/app/pytest.ini
5658 depends_on :
57- db : {"condition": "service_healthy"}
58- redis : {"condition": "service_healthy"}
59- init : {"condition": "service_completed_successfully"}
59+ db : { "condition": "service_healthy" }
60+ redis : { "condition": "service_healthy" }
61+ init : { "condition": "service_completed_successfully" }
6062
6163 db :
6264 image : postgis/postgis:15-3.3
@@ -67,7 +69,7 @@ services:
6769 ports :
6870 - " 15432:5432"
6971 healthcheck :
70- test : [ "CMD-SHELL","psql -U postgres -d shareabouts -c \"SELECT ST_Buffer( ST_SetSRID('POINT(0 0)'::GEOMETRY, 4326), 1) AS geom ;\""]
72+ test : [ "CMD-SHELL", "psql -U postgres -d shareabouts -c \"SELECT ST_Buffer( ST_SetSRID('POINT(0 0)'::GEOMETRY, 4326), 1) AS geom ;\"" ]
7173 interval : 10s
7274 timeout : 5s
7375 retries : 5
@@ -80,4 +82,4 @@ services:
8082 test : [ "CMD", "redis-cli", "ping" ]
8183 interval : 10s
8284 timeout : 5s
83- retries : 5
85+ retries : 5
0 commit comments