Add a HEALTHCHECK to the images
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 52/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- docker, docker-compose, postgres
- Ambito
- databases, devops, infrastructure
Direzione di ricerca
Inizia individuando le definizioni delle immagini Docker per le immagini Postgres e verificando come vengono create le relative varianti. Aggiungi in modo coerente l’healthcheck richiesto, quindi verifica che Docker Compose possa attendere che il database segnali uno stato integro prima di avviare l’applicazione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
When helping people on StackOverflow, I often see people having problems with Docker Compose and applications that try to connect to the database immediately on startup. When using a simple docker compose 'depends_on' directive, compose only waits for the database to be started before starting the application. The application then fails because the database isn't ready to accept connections yet.
The solution is to add a healthcheck to the database container in docker compose and have the application wait for the database to enter a healthy state.
It would be nice if the healthcheck was included in the Postgres image by default. A simple HEALTHCHECK ["pg_isready"] should be enough.
- Lingua principale
- Shell
- Stelle
- 2.5k
- Fork
- 1.2k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di docker-library/postgres
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
docker-library/postgres#1420 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
docker-library/postgres#1419 · 2 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
docker-library/postgres#1389 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
docker-library/postgres#1356 · 5 commenti · 7 reazioni ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
docker-library/postgres#1355 · 10 commenti · 11 reazioni ·
Tutte le issue di docker-library/postgres
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
astral-sh/python-build-standalone#1293 ·
-
package-update
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
oSoWoSo/vOid_Community_repOsitory#185 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
carbon-language/carbon-lang#7821 ·