Merge pull request #9 from cwildfoerster/healthcheck

add healthcheck
This commit is contained in:
Constantin 2020-01-25 15:22:55 +01:00 committed by GitHub
commit 0586919a28
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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}