@@ -10,6 +10,8 @@ services:
1010 POSTGRES_DB : ${DB_NAME}
1111 ports :
1212 - " 5432:5432"
13+ volumes :
14+ - ${PWD}/indexer/postgres:/var/lib/postgresql/data
1315 healthcheck :
1416 test : ["CMD-SHELL", "pg_isready -U ${DB_USERNAME}"]
1517 interval : 10s
@@ -18,66 +20,39 @@ services:
1820
1921 db-migration :
2022 build :
21- context : .
23+ context : ../
2224 dockerfile : Dockerfile.development
2325 container_name : db-migration
2426 environment :
2527 DB_HOST : indexer-db
26- command : >
27- /bin/sh -c "
28- rm -f /app/shared/db-migration-complete &&
29- rm -f /app/shared/graphql-running &&
30- yarn create:database &&
31- touch /app/shared/db-migration-complete"
28+ command : ["yarn", "create:database"]
3229 depends_on :
3330 indexer-db :
3431 condition : service_healthy
35- volumes :
36- - shared-data:/app/shared
3732
3833 graphql-app :
3934 build :
40- context : .
35+ context : ../
4136 dockerfile : Dockerfile.development
4237 container_name : kad-indexer-graphql
4338 environment :
4439 DB_HOST : indexer-db
45- command : >
46- /bin/sh -c "
47- while [ ! -f /app/shared/db-migration-complete ]; do
48- echo 'Waiting for db-migration...';
49- sleep 6;
50- done &&
51- touch /app/shared/graphql-running &&
52- yarn dev:graphql"
40+ command : ["yarn", "dev:graphql"]
5341 ports :
5442 - " 3001:3001"
5543 depends_on :
5644 db-migration :
57- condition : service_started
58- volumes :
59- - shared-data:/app/shared
45+ condition : service_completed_successfully
6046
6147 streaming-app :
6248 build :
63- context : .
49+ context : ../
6450 dockerfile : Dockerfile.development
6551 container_name : kad-indexer-streaming
6652 environment :
6753 DB_HOST : indexer-db
6854 KADENA_GRAPHQL_API_URL : http://graphql-app
69- command : >
70- /bin/sh -c "
71- while [ ! -f /app/shared/graphql-running ]; do
72- echo 'Waiting for graphql-app...';
73- sleep 6;
74- done &&
75- yarn dev:streaming"
55+ command : ["yarn", "dev:streaming"]
7656 depends_on :
7757 graphql-app :
7858 condition : service_started
79- volumes :
80- - shared-data:/app/shared
81-
82- volumes :
83- shared-data :
0 commit comments