summaryrefslogtreecommitdiff
path: root/docker
diff options
context:
space:
mode:
authorDaniel Wiesenberg <weasy@hotmail.de>2021-03-12 18:26:23 +0100
committerDaniel Wiesenberg <weasy@hotmail.de>2021-05-22 16:53:48 +0200
commit52a96b3d8404ccfc04ab0e0ba60ed8f9963ba686 (patch)
tree0183febcd5fd025c36ffd1ef9394d3d16fe6571c /docker
parent42c9ba2e5cdc02cac85da8e317e65ed6c32ba133 (diff)
downloadconduit-52a96b3d8404ccfc04ab0e0ba60ed8f9963ba686.zip
Update Dockerfile and docker-compose
- Dockerfile now tracks the gitlab repository and the master branch. - docker-compose now points to conduit.toml instead of Rocket.toml and its env vars were also renamed from ROCKET_ to CONDUIT_. Furthermore vectorim/riot-web was changed to vectorim/element-web
Diffstat (limited to 'docker')
-rw-r--r--docker/README.md6
-rw-r--r--docker/docker-compose.traefik.yml27
2 files changed, 18 insertions, 15 deletions
diff --git a/docker/README.md b/docker/README.md
index f90b9a4..6ae7453 100644
--- a/docker/README.md
+++ b/docker/README.md
@@ -17,13 +17,13 @@ The Dockerfile includes a few build arguments that should be supplied when build
ARG LOCAL=false
ARG CREATED
ARG VERSION
-ARG GIT_REF=HEAD
+ARG GIT_REF=origin/master
```
- **CREATED:** Date and time as string (date-time as defined by RFC 3339). Will be used to create the Open Container Initiative compliant label `org.opencontainers.image.created`. Supply by it like this `$(date -u +'%Y-%m-%dT%H:%M:%SZ')`
- **VERSION:** The SemVer version of Conduit, which is in the image. Will be used to create the Open Container Initiative compliant label `org.opencontainers.image.version`. If you have a `Cargo.toml` in your build context, you can get it with `$(grep -m1 -o '[0-9].[0-9].[0-9]' Cargo.toml)`
- **LOCAL:** *(Optional)* A boolean value, specifies if the local build context should be used, or if the official repository will be cloned. If not supplied with the build command, it will default to `false`.
-- **GIT_REF:** *(Optional)* A git ref, like `HEAD` or a commit ID. The supplied ref will be used to create the Open Container Initiative compliant label `org.opencontainers.image.revision` and will be the ref that is cloned from the repository when not building from the local context. If not supplied with the build command, it will default to `HEAD`.
+- **GIT_REF:** *(Optional)* A git ref, like `HEAD` or a commit ID. The supplied ref will be used to create the Open Container Initiative compliant label `org.opencontainers.image.revision` and will be the ref that is cloned from the repository when not building from the local context. If not supplied with the build command, it will default to `origin/master`.
To build the image you can use the following command
@@ -40,7 +40,7 @@ which also will tag the resulting image as `matrixconduit/matrix-conduit:latest`
After building the image you can simply run it with
``` bash
-docker run -d -p 8448:8000 -v db:/srv/conduit/.local/share/conduit -e ROCKET_SERVER_NAME="localhost:8000" matrixconduit/matrix-conduit:latest
+docker run -d -p 8448:8000 -v db:/srv/conduit/.local/share/conduit -e CONDUIT_SERVER_NAME="localhost:8000" matrixconduit/matrix-conduit:latest
```
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.
diff --git a/docker/docker-compose.traefik.yml b/docker/docker-compose.traefik.yml
index 111eaa5..25497c6 100644
--- a/docker/docker-compose.traefik.yml
+++ b/docker/docker-compose.traefik.yml
@@ -15,32 +15,35 @@ services:
# CREATED:
# VERSION:
# LOCAL: 'false'
- # GIT_REF: HEAD
+ # GIT_REF: origin/master
restart: unless-stopped
volumes:
- db:/srv/conduit/.local/share/conduit
- ### Uncomment if you want to use Rocket.toml to configure Conduit
- ### Note: Set env vars will override Rocket.toml values
- # - ./Rocket.toml:/srv/conduit/Rocket.toml
+ ### Uncomment if you want to use conduit.toml to configure Conduit
+ ### Note: Set env vars will override conduit.toml values
+ # - ./conduit.toml:/srv/conduit/conduit.toml
networks:
- proxy
environment:
ROCKET_SERVER_NAME: localhost:8000 # replace with your own name
### Uncomment and change values as desired
- # ROCKET_LOG: normal # Available levels are: off, debug, normal, critical
- # ROCKET_PORT: 8000
- # ROCKET_REGISTRATION_DISABLED: 'true'
- # ROCKET_ENCRYPTION_DISABLED: 'true'
- # ROCKET_DATABASE_PATH: /srv/conduit/.local/share/conduit
- # ROCKET_WORKERS: 10
- # ROCKET_MAX_REQUEST_SIZE: 20_000_000 # in bytes, ~20 MB
+ # CONDUIT_ADDRESS: 127.0.0.1
+ # CONDUIT_PORT: 8000
+ # CONDUIT_LOG: normal # Available levels are: off, debug, normal, critical
+ # CONDUIT_ALLOW_JAEGER: 'false'
+ # CONDUIT_ALLOW_REGISTRATION : 'false'
+ # CONDUIT_ALLOW_ENCRYPTION: 'false'
+ # CONDUIT_ALLOW_FEDERATION: 'false'
+ # CONDUIT_DATABASE_PATH: /srv/conduit/.local/share/conduit
+ # CONDUIT_WORKERS: 10
+ # CONDUIT_MAX_REQUEST_SIZE: 20_000_000 # in bytes, ~20 MB
### Uncomment if you want to use your own Element-Web App.
### Note: You need to provide a config.json for Element and you also need a second
### Domain or Subdomain for the communication between Element and Conduit
### Config-Docs: https://github.com/vector-im/element-web/blob/develop/docs/config.md
# element-web:
- # image: vectorim/riot-web:latest
+ # image: vectorim/element-web:latest
# restart: unless-stopped
# volumes:
# - ./element_config.json:/app/config.json