Implement a basic healthcheck

This commit is contained in:
flow.gunso
2020-01-06 18:27:42 +01:00
parent eb5c9a1650
commit 7543a06f51
2 changed files with 31 additions and 1 deletions

View File

@@ -66,10 +66,12 @@ RUN apt-get update && apt-get install -y gnupg && \
# Copy over the entrypoints, healthchecks and tests.
COPY docker-entrypoint.sh /entrypoint.sh
COPY docker-healthcheck.sh /healthcheck.sh
COPY seafile-healthcheck.sh /home/seafuser/healthcheck.sh
COPY seafile-entrypoint.sh /home/seafuser/entrypoint.sh
COPY tests /tests
# Set bash as the entrypoint and run the entrypoint script from that.
ENTRYPOINT ["/bin/bash"]
CMD ["/entrypoint.sh"]
CMD ["/entrypoint.sh"]
HEALTHCHECK --interval=5m --start-period=20s --retries=1 CMD ["su", "-", "${UNAME}", "-c", "/healthcheck.sh"]