Skip to content
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

Add an ability to wait for the PostgreSQL to become available before starting #1539

Open
nyurik opened this issue Oct 9, 2024 · 3 comments
Labels
pg Related to PostgreSQL sources

Comments

@nyurik
Copy link
Member

nyurik commented Oct 9, 2024

No description provided.

@nyurik nyurik added the pg Related to PostgreSQL sources label Oct 9, 2024
@teyotan
Copy link

teyotan commented Oct 16, 2024

May I try working on this?

@nyurik
Copy link
Member Author

nyurik commented Oct 16, 2024

sure thing

@mzeedijk
Copy link

mzeedijk commented Nov 20, 2024

Not sure if this helps but I added a After and a ExecStartPost line for this to the systemd service service file. For me it did the trick:

[Unit]
Description = A blazing fast map tile server which can generate and serve vector tiles on the fly from large PostGIS databases, PMTile, and MBTile files
After = postgresql.service

[Service]
ExecStart = /usr/bin/martin --config /usr/local/etc/martin/config.yaml
ExecStartPost = /usr/bin/timeout 30 sh -c 'while ! ss -H -t -l -n sport = :5432 | grep -q "^LISTEN.*:5432"; do sleep 1; done'
Restart=always

[Install]
WantedBy = multi-user.target

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pg Related to PostgreSQL sources
Projects
None yet
Development

No branches or pull requests

3 participants