Add healthcheck
This commit is contained in:
parent
e220a049f6
commit
71a94ce9f2
2 changed files with 5 additions and 2 deletions
|
|
@ -51,5 +51,6 @@ VOLUME /dumps
|
||||||
WORKDIR /sync
|
WORKDIR /sync
|
||||||
COPY . /sync
|
COPY . /sync
|
||||||
ENV PATH="/sync:${PATH}"
|
ENV PATH="/sync:${PATH}"
|
||||||
RUN chmod +x /sync/sync /etc/service/*/run
|
RUN chmod +x /sync/sync /etc/service/*/run /sync/healthcheck
|
||||||
CMD ["start.sh"]
|
CMD ["start.sh"]
|
||||||
|
HEALTHCHECK --start-period=30s CMD /sync/healthcheck
|
||||||
2
healthcheck
Executable file
2
healthcheck
Executable file
|
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/bash
|
||||||
|
PG_PASSWORD=$POSTGRES_PASSWORD pg_isready -U $POSTGRES_USER
|
||||||
Loading…
Reference in a new issue