add healthcheck

This commit is contained in:
Constantin Wildförster 2020-01-25 15:22:12 +01:00
parent f86b689cc8
commit 45b900039a
3 changed files with 7 additions and 0 deletions

View file

@ -33,5 +33,7 @@ ENV DOCKER_HOST unix:///tmp/docker.sock
VOLUME ["/etc/nginx/certs", "/etc/nginx/dhparam"]
HEALTHCHECK --start-period=1m CMD /app/docker-healthcheck.sh || exit 1
ENTRYPOINT ["/app/docker-entrypoint.sh"]
CMD ["forego", "start", "-r"]

View file

@ -30,5 +30,7 @@ ENV DOCKER_HOST unix:///tmp/docker.sock
VOLUME ["/etc/nginx/certs", "/etc/nginx/dhparam"]
HEALTHCHECK --start-period=1m CMD /app/docker-healthcheck.sh || exit 1
ENTRYPOINT ["/app/docker-entrypoint.sh"]
CMD ["forego", "start", "-r"]

3
docker-healthcheck.sh Executable file
View file

@ -0,0 +1,3 @@
#!/usr/bin/env bash
PORT=${HTTPS_PORT:-443}
curl --max-time 5 -kILs --fail https://localhost:${PORT}