Add healthcheck

This commit is contained in:
Greyscale 2022-08-23 15:18:26 +02:00
parent e220a049f6
commit 71a94ce9f2
No known key found for this signature in database
GPG key ID: 74BAFF55434DA4B2
2 changed files with 5 additions and 2 deletions

View file

@ -51,5 +51,6 @@ VOLUME /dumps
WORKDIR /sync
COPY . /sync
ENV PATH="/sync:${PATH}"
RUN chmod +x /sync/sync /etc/service/*/run
CMD ["start.sh"]
RUN chmod +x /sync/sync /etc/service/*/run /sync/healthcheck
CMD ["start.sh"]
HEALTHCHECK --start-period=30s CMD /sync/healthcheck

2
healthcheck Executable file
View file

@ -0,0 +1,2 @@
#!/bin/bash
PG_PASSWORD=$POSTGRES_PASSWORD pg_isready -U $POSTGRES_USER