-
Notifications
You must be signed in to change notification settings - Fork 470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Detect when container is ready #316
Comments
Hi latot,
As I understand, the ~"temporary daemon" is running only on the Unix socket. And there is ~ good documentation about the initialization steps used by this project.
so if you don't want to connect to the ~"temporary daemon" ( via Unix socket. ) until pg_isready -h $(hostname -i); do
sleep 0.1
done ( as suggested in docker-library/postgres#146 (comment) ) |
Hi!, |
If I understand you correctly, you re-tested |
my suggestion is the same as the upstream suggestion
|
Hi, I think I don't understand you exaplain in your first comment, now I get it, I'll test probable monday, thx for your help :) |
Hi!, well, first sorry, my redaction was very ugly in the last comment. And yes, the method works!, I think can be easy have it in the docs more than in the comments, in order to do this works in cross platform, I'm doing the next thing, first instead run the complete sh script, only run
I think the last thing, is ideally update the docs and specify how to use Thx! |
Hi all, I'm trying to use postgis for apps, but is hard because I can't found a way to know when a contianer is ready (I can need mount several of them).
Is not like there is no way to check the logs with regex, but I think would be great have a way to can now when the container is ready.
There is a important thing about this type of container, I checked docker-library/postgres#146, sadly does not has a cross-platform solution,
pg_isready
helps in the postgres case, but in case of postgis not, because after postgres is mounted, then the extensions must be installed and then the server restarts, due to thispg_ready
ends in the installation of the extension because is a moment where postgres is working.There can be different solutions, maybe a cross-platform way, is to have a file in the root of the container with the a general status of the container, where checking it we can now when the container is ready, maybe someone else have a robust solution to that.
Thx!
The text was updated successfully, but these errors were encountered: