Open karpov-denys opened 3 years ago
I am not super familiar with "wait-for" but it seems like the database being ready (i.e. listening on port 5432) is not the important thing because it will be listening on port 5432 even during the db dump. The real waiting should be for the database to have a complete state.
The link you provided has an example shell script wait-for-postgres.sh
: https://docs.docker.com/compose/startup-order/ and you can perhaps change the command there to "select 1" from a table which is supposed to mark as the database dump being finished?
I am not super familiar with "wait-for" but it seems like the database being ready (i.e. listening on port 5432) is not the important thing because it will be listening on port 5432 even during the db dump. The real waiting should be for the database to have a complete state.
Yes, you are right. A database is ready, when all migrations and dump are added. It is mean database has complete state. If I'm not mistaken, in the period of running sql script, migration, etс. database does not response on 5432 port.
The link you provided has an example shell script
wait-for-postgres.sh
: https://docs.docker.com/compose/startup-order/ and you can perhaps change the command there to "select 1" from a table which is supposed to mark as the database dump being finished?
The problem is not in run command inside script.
In case of adding CMD ...
or command: ...
in custom Dockerfile or docker-compose.yml hasura/graphql-engine
is not initialized in correct way.
I think line command: ...
grind the correct command inside oficial hasura/graphql-engine
Dockerfile
I'm trying to do something similar. Did you find a way around it @karpov-denys ?
For any who stumbles upon this issue on google search. I found using podman compose
works rather than podman-compose
.
Dear community, I need some help. I stuck here. I use docker-compose for starting my services. Before work with DB I need add prod database dump to it. It is not quick operation. For that period DB is not available. For avoid errors from hasura/graphql-engine I have added
restart: always
. It is help to connect both container, but that had not been very informative for other developer. Also in the case of restart in the background we lose logs Is it possible to use pattern wait-for from docs.docker.com? I try to add it, butgraphql-steady
service is not initialized in correct way now. I do not now which command I should add tocommand:
for proper start of hasura services insidegraphql-steady
.