summaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorDaniel Wiesenberg <weasy@hotmail.de>2020-08-24 23:30:39 +0200
committerDaniel Wiesenberg <weasy@hotmail.de>2020-08-25 09:02:45 +0200
commit38ac3e42be87509ec04c35adfb65b3ba89daecbf (patch)
tree20c83da8732a29f84665a3a66c0168a09f437639 /Dockerfile
parent0f524955b24a88b384fb72d97c6386a17996083e (diff)
downloadconduit-38ac3e42be87509ec04c35adfb65b3ba89daecbf.zip
Docker add healthcheck and mention Docker Hub image
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile8
1 files changed, 6 insertions, 2 deletions
diff --git a/Dockerfile b/Dockerfile
index fa4b16d..ff84ac6 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -53,10 +53,10 @@ LABEL org.opencontainers.image.created=${CREATED} \
org.opencontainers.image.url="https://conduit.rs/" \
org.opencontainers.image.revision=${GIT_REF} \
org.opencontainers.image.source="https://git.koesters.xyz/timo/conduit.git" \
- org.opencontainers.image.documentation.="" \
org.opencontainers.image.licenses="AGPL-3.0-only" \
+ org.opencontainers.image.documentation="" \
org.opencontainers.image.ref.name="" \
- org.label-schema.docker.build="docker build . -t conduit_homeserver:latest --build-arg CREATED=$(date -u +'%Y-%m-%dT%H:%M:%SZ') --build-arg VERSION=$(grep -m1 -o '[0-9].[0-9].[0-9]' Cargo.toml)" \
+ org.label-schema.docker.build="docker build . -t matrixconduit/matrix-conduit:latest --build-arg CREATED=$(date -u +'%Y-%m-%dT%H:%M:%SZ') --build-arg VERSION=$(grep -m1 -o '[0-9].[0-9].[0-9]' Cargo.toml)" \
maintainer="Weasy666"
# Standard port on which Rocket launches
@@ -81,11 +81,15 @@ RUN chown -cR www-data:www-data /srv/conduit
# Install packages needed to run Conduit
RUN apk add --no-cache \
ca-certificates \
+ curl \
libgcc
# Create a volume for the database, to persist its contents
VOLUME ["/srv/conduit/.local/share/conduit"]
+# Test if Conduit is still alive, uses the same endpoint as Element
+HEALTHCHECK --start-period=2s CMD curl --fail -s http://localhost:8000/_matrix/client/versions || curl -k --fail -s https://localhost:8000/_matrix/client/versions || exit 1
+
# Set user to www-data
USER www-data
# Set container home directory