Fix ci healthcheck

This commit is contained in:
Jamie Curnow
2021-07-15 17:05:52 +10:00
parent 17a5454b7a
commit b616988f7e
6 changed files with 33 additions and 26 deletions

View File

@@ -35,12 +35,14 @@ RUN mkdir -p /dist \
# Final image
#===============
FROM jc21/nginx-full:github-acme.sh AS final
FROM jc21/nginx-full:github-no-acme AS final
COPY --from=gobuild /dist/server /app/bin/server
ENV SUPPRESS_NO_CONFIG_WARNING=1
ENV S6_FIX_ATTRS_HIDDEN=1
ENV SUPPRESS_NO_CONFIG_WARNING=1 \
S6_FIX_ATTRS_HIDDEN=1 \
CERT_HOME=/data/acme/
RUN echo "fs.file-max = 65535" > /etc/sysctl.conf
# s6 overlay

View File

@@ -1,4 +1,4 @@
FROM jc21/nginx-full:github-acme.sh-golang
FROM jc21/nginx-full:github-no-acme-golang
LABEL maintainer="Jamie Curnow <jc@jc21.com>"
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

View File

@@ -0,0 +1,7 @@
#!/usr/bin/env bash
set -euf -o pipefail
HEALTHY="$(curl --silent "http://127.0.0.1:3000/api" | jq --raw-output '.result.healthy')"
echo "Healthy: ${HEALTHY}"
[ "$HEALTHY" = 'true' ] || exit 1