Browse Source

Add Health Check to Docker Container (#958)

As per title.

This adds a 'healthy' status to the docker container status.

cc @prologic

Co-authored-by: Phil S <ullarah@noreply@mills.io>
Reviewed-on: #958
Co-authored-by: Phil S. <ullarah@noreply@mills.io>
Co-committed-by: Phil S. <ullarah@noreply@mills.io>
main
Phil S. 3 weeks ago committed by James Mills
parent
commit
d46e50b3b1
  1. 3
      Dockerfile
  2. 6
      docker-compose.yml
  3. 6
      docker-stack.yml

3
Dockerfile

@ -79,4 +79,7 @@ COPY --from=build /src/internal/theme /theme
COPY .dockerfiles/entrypoint.sh /init
ENTRYPOINT ["/init"]
HEALTHCHECK --interval=10s --timeout=10s --retries=5 \
CMD wget -nv -t1 --spider 'http://localhost:8000' || exit 1
CMD ["yarnd"]

6
docker-compose.yml

@ -11,3 +11,9 @@ services:
volumes:
- ./data:/src/data
- ./internal:/src/internal
healthcheck:
test: wget -nv -t1 --spider 'http://localhost:8000' || exit 1
interval: 10s
retries: 5
start_period: 10s
timeout: 10s

6
docker-stack.yml

@ -16,6 +16,12 @@ services:
- MAGICLINK_SECRET=supersecretchangeme
volumes:
- twtxt:/data
healthcheck:
test: wget -nv -t1 --spider 'http://localhost:8000' || exit 1
interval: 10s
retries: 5
start_period: 10s
timeout: 10s
volumes:
twtxt:

Loading…
Cancel
Save