summaryrefslogtreecommitdiff
path: root/docker
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 /docker
parent0f524955b24a88b384fb72d97c6386a17996083e (diff)
downloadconduit-38ac3e42be87509ec04c35adfb65b3ba89daecbf.zip
Docker add healthcheck and mention Docker Hub image
Diffstat (limited to 'docker')
-rw-r--r--docker/README.md8
-rw-r--r--docker/docker-compose.traefik.yml23
2 files changed, 16 insertions, 15 deletions
diff --git a/docker/README.md b/docker/README.md
index 5a6ecde..c569c5f 100644
--- a/docker/README.md
+++ b/docker/README.md
@@ -28,10 +28,10 @@ ARG GIT_REF=HEAD
To build the image you can use the following command
``` bash
-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)
+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)
```
-which also will tag the resulting image as `conduit_homeserver:latest`.
+which also will tag the resulting image as `matrixconduit/matrix-conduit:latest`.
**Note:** it ommits the two optional `build-arg`s.
@@ -40,7 +40,7 @@ which also will tag the resulting image as `conduit_homeserver:latest`.
After building the image you can simply run it with
``` bash
-docker run conduit_homeserver:latest -p 8448:8000 -v db:/srv/conduit/.local/share/conduit -e ROCKET_SERVER_NAME="localhost:8000"
+docker run -d matrixconduit/matrix-conduit:latest -p 8448:8000 -v db:/srv/conduit/.local/share/conduit -e ROCKET_SERVER_NAME="localhost:8000"
```
For detached mode, you also need to use the `-d` flag. You can pass in more env vars as are shown here, for an overview of possible values, you can take a look at the `docker-compose.yml` file.
@@ -49,7 +49,7 @@ If you just want to test Conduit for a short time, you can use the `--rm` flag,
## Docker-compose
-If the docker command is not for you or your setup, you can also use one of the provided `docker-compose` files. Depending on your proxy setup, use the `docker-compose.traefik.yml` including `docker-compose.override.traefik.yml` or the normal `docker-compose.yml` for every other reverse proxy.
+If the docker command is not for you or your setup, you can also use one of the provided `docker-compose` files. Depending on your proxy setup, use the [`docker-compose.traefik.yml`](docker-compose.traefik.yml) including [`docker-compose.override.traefik.yml`](docker-compose.override.traefik.yml) or the normal [`docker-compose.yml`](../docker-compose.yml) for every other reverse proxy.
### Build
diff --git a/docker/docker-compose.traefik.yml b/docker/docker-compose.traefik.yml
index ad1dad8..111eaa5 100644
--- a/docker/docker-compose.traefik.yml
+++ b/docker/docker-compose.traefik.yml
@@ -3,18 +3,19 @@ version: '3'
services:
homeserver:
- ### If you already built the Conduit image with 'docker build', then you can uncomment the
- ### 'image' line and comment out the 'build' option.
- # image: conduit_homeserver:latest
- ### If you want meaningful labels in you built Conduit image, you should run docker-compose like this:
+ ### If you already built the Conduit image with 'docker build' or want to use the Docker Hub image,
+ ### then you are ready to go.
+ image: matrixconduit/matrix-conduit:latest
+ ### If you want to build a fresh image from the sources, then comment the image line and uncomment the
+ ### build lines. If you want meaningful labels in your built Conduit image, you should run docker-compose like this:
### CREATED=$(date -u +'%Y-%m-%dT%H:%M:%SZ') VERSION=$(grep -m1 -o '[0-9].[0-9].[0-9]' Cargo.toml) docker-compose up -d
- build:
- context: .
- args:
- CREATED:
- VERSION:
- LOCAL: false
- GIT_REF: HEAD
+ # build:
+ # context: .
+ # args:
+ # CREATED:
+ # VERSION:
+ # LOCAL: 'false'
+ # GIT_REF: HEAD
restart: unless-stopped
volumes:
- db:/srv/conduit/.local/share/conduit