Browse Source

Exchange curl for wget in healthcheck

merge-requests/225/head
Jonas Zohren 4 years ago
parent
commit
2d2fd0e506
No known key found for this signature in database
GPG Key ID: FE3ED5D90A175463
  1. 1
      Dockerfile
  2. 2
      docker/ci-binaries-packaging.Dockerfile
  3. 6
      docker/healthcheck.sh

1
Dockerfile

@ -43,7 +43,6 @@ ENV CONDUIT_CONFIG="/srv/conduit/conduit.toml" @@ -43,7 +43,6 @@ ENV CONDUIT_CONFIG="/srv/conduit/conduit.toml"
# Conduit needs:
# ca-certificates: for https
# curl: for the container's healtcheck
# libgcc: Apparently this is needed, even if I (@jfowl) don't know exactly why. But whatever, it's not that big.
RUN apk add --no-cache \
ca-certificates \

2
docker/ci-binaries-packaging.Dockerfile

@ -19,11 +19,9 @@ ENV CONDUIT_CONFIG="/srv/conduit/conduit.toml" @@ -19,11 +19,9 @@ ENV CONDUIT_CONFIG="/srv/conduit/conduit.toml"
# Conduit needs:
# ca-certificates: for https
# curl: for the container's healtcheck
# libgcc: Apparently this is needed, even if I (@jfowl) don't know exactly why. But whatever, it's not that big.
RUN apk add --no-cache \
ca-certificates \
curl \
libgcc

6
docker/healthcheck.sh

@ -7,7 +7,7 @@ fi @@ -7,7 +7,7 @@ fi
# The actual health check.
# We try to first get a response on HTTP and when that fails on HTTPS and when that fails, we exit with code 1.
# TODO: Change this to a single curl call. Do we have a config value that we can check for that?
curl --fail -s "http://localhost:${CONDUIT_PORT}/_matrix/client/versions" || \
curl -k --fail -s "https://localhost:${CONDUIT_PORT}/_matrix/client/versions" || \
# TODO: Change this to a single wget call. Do we have a config value that we can check for that?
wget --no-verbose --tries=1 --spider "http://localhost:${CONDUIT_PORT}/_matrix/client/versions" || \
wget --no-verbose --tries=1 --spider "https://localhost:${CONDUIT_PORT}/_matrix/client/versions" || \
exit 1

Loading…
Cancel
Save