File tree Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 2020 addgroup --system gleam_packages && \
2121 adduser --system gleam_packages -g gleam_packages
2222COPY --from=build /app/build/erlang-shipment /app
23+ COPY healthcheck.sh /app/healthcheck.sh
2324VOLUME /app/data
2425LABEL org.opencontainers.image.source=https://github.com/gleam-lang/packages
2526LABEL org.opencontainers.image.description="Gleam Packages web application"
Original file line number Diff line number Diff line change @@ -47,6 +47,13 @@ Environment=DATABASE_PATH=/storage
4747# Provide the secrets
4848EnvironmentFile =/srv/packages-environment
4949
50+ # Restart the service if the homepage no longer loads
51+ HealthCmd =sh -c /app/healthcheck.sh
52+ HealthInterval =30s
53+ HealthTimeout =5s
54+ HealthRetries =3
55+ HealthOnFailure =restart
56+
5057[Install]
5158WantedBy =multi-user.target default.target
5259```
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ exec wget --spider --quiet " http://127.0.0.1:3000?search=healthcheck"
You can’t perform that action at this time.
0 commit comments