Add netcat install in dockerfile to provide a way to healthcheck in docker compose (#572)
This commit is contained in:
parent
9a75243732
commit
1f65fec9ea
@ -16,7 +16,7 @@ FROM debian:buster-slim
|
|||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
apt-get update && \
|
apt-get update && \
|
||||||
apt-get install -y ca-certificates openssl postgresql && \
|
apt-get install -y ca-certificates openssl postgresql netcat && \
|
||||||
update-ca-certificates && \
|
update-ca-certificates && \
|
||||||
apt-get clean autoclean && \
|
apt-get clean autoclean && \
|
||||||
apt-get autoremove --yes && \
|
apt-get autoremove --yes && \
|
||||||
|
@ -31,6 +31,9 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
postgres:
|
postgres:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "nc", "-vz", "127.0.0.1", "8081"]
|
||||||
|
interval: 5s
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
data:
|
data:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user