summaryrefslogtreecommitdiff
path: root/docker
diff options
context:
space:
mode:
authorTimo Kösters <timo@koesters.xyz>2021-09-01 08:08:22 +0000
committerTimo Kösters <timo@koesters.xyz>2021-09-01 08:08:22 +0000
commit22779c21d3eb64f60a1bf85e6eaa211bdd113209 (patch)
tree2721ce79a65f702fc0161a50c980697884e346cc /docker
parent364820aae424f08633ff78c3e30d874f95240d4a (diff)
parent8c584887c93735e1035d59461c6c1d4b96c0d7d6 (diff)
downloadconduit-22779c21d3eb64f60a1bf85e6eaa211bdd113209.zip
Merge branch 'health_script' into 'master'
Fix healthcheck.sh permissions and rearange ci dockerfile See merge request famedly/conduit!179
Diffstat (limited to 'docker')
-rw-r--r--docker/ci-binaries-packaging.Dockerfile21
1 files changed, 11 insertions, 10 deletions
diff --git a/docker/ci-binaries-packaging.Dockerfile b/docker/ci-binaries-packaging.Dockerfile
index 1fe85bf..fb67439 100644
--- a/docker/ci-binaries-packaging.Dockerfile
+++ b/docker/ci-binaries-packaging.Dockerfile
@@ -9,6 +9,12 @@
FROM alpine:3.14
+# Install packages needed to run Conduit
+RUN apk add --no-cache \
+ ca-certificates \
+ curl \
+ libgcc
+
ARG CREATED
ARG VERSION
ARG GIT_REF
@@ -36,6 +42,10 @@ EXPOSE 6167
# create data folder for database
RUN mkdir -p /srv/conduit/.local/share/conduit
+# Copy the Conduit binary into the image at the latest possible moment to maximise caching:
+COPY ./conduit-x86_64-unknown-linux-musl /srv/conduit/conduit
+COPY ./docker/healthcheck.sh /srv/conduit/
+
# Add www-data user and group with UID 82, as used by alpine
# https://git.alpinelinux.org/aports/tree/main/nginx/nginx.pre-install
RUN set -x ; \
@@ -45,12 +55,8 @@ RUN set -x ; \
# Change ownership of Conduit files to www-data user and group
RUN chown -cR www-data:www-data /srv/conduit
+RUN chmod +x /srv/conduit/healthcheck.sh
-# Install packages needed to run Conduit
-RUN apk add --no-cache \
- ca-certificates \
- curl \
- libgcc
# Test if Conduit is still alive, uses the same endpoint as Element
HEALTHCHECK --start-period=5s --interval=60s CMD ./healthcheck.sh
@@ -61,8 +67,3 @@ USER www-data
WORKDIR /srv/conduit
# Run Conduit
ENTRYPOINT [ "/srv/conduit/conduit" ]
-
-
-# Copy the Conduit binary into the image at the latest possible moment to maximise caching:
-COPY ./conduit-x86_64-unknown-linux-musl /srv/conduit/conduit
-COPY ./docker/healthcheck.sh /srv/conduit/