diff --git a/Dockerfile b/Dockerfile index 76d10ea91b565c5f14daaf4e4d56861532f95b46..8a76c47057ab071d18ba3fce755d1559b7e47a78 100644 --- a/Dockerfile +++ b/Dockerfile @@ -36,9 +36,11 @@ FROM docker.io/debian:bullseye-slim AS runner # You still need to map the port when using the docker command or docker-compose. EXPOSE 6167 +ARG DEFAULT_DB_PATH=/var/lib/matrix-conduit + ENV CONDUIT_PORT=6167 \ CONDUIT_ADDRESS="0.0.0.0" \ - CONDUIT_DATABASE_PATH=/var/lib/matrix-conduit \ + CONDUIT_DATABASE_PATH=${DEFAULT_DB_PATH} \ CONDUIT_CONFIG='' # └─> Set no config file to do all configuration with env vars @@ -51,9 +53,6 @@ RUN apt-get update && apt-get -y --no-install-recommends install \ wget \ && rm -rf /var/lib/apt/lists/* -# Created directory for the database and media files -RUN mkdir -p /srv/conduit/.local/share/conduit - # Test if Conduit is still alive, uses the same endpoint as Element COPY ./docker/healthcheck.sh /srv/conduit/healthcheck.sh HEALTHCHECK --start-period=5s --interval=5s CMD ./healthcheck.sh @@ -69,10 +68,12 @@ RUN set -x ; \ groupadd -r -g ${GROUP_ID} conduit ; \ useradd -l -r -M -d /srv/conduit -o -u ${USER_ID} -g conduit conduit && exit 0 ; exit 1 -# Change ownership of Conduit files to conduit user and group and make the healthcheck executable: +# Create database directory, change ownership of Conduit files to conduit user and group and make the healthcheck executable: RUN chown -cR conduit:conduit /srv/conduit && \ - chmod +x /srv/conduit/healthcheck.sh - + chmod +x /srv/conduit/healthcheck.sh && \ + mkdir -p ${DEFAULT_DB_PATH} && \ + chown -cR conduit:conduit ${DEFAULT_DB_PATH} + # Change user to conduit, no root permissions afterwards: USER conduit # Set container home directory diff --git a/conduit-example.toml b/conduit-example.toml index 5eed0708ba2d2b68cd7abf1f164405e4932aeaef..a2629d1108500d780c3750849148a0e259d23f23 100644 --- a/conduit-example.toml +++ b/conduit-example.toml @@ -24,8 +24,14 @@ # This is the only directory where Conduit will save its data database_path = "/var/lib/matrix-conduit/" + +# Set the database backend Conduit will use +# Current options are "rocksdb" and "sqlite" database_backend = "rocksdb" +# The total amount of memory that the database will use. +#db_cache_capacity_mb = 200 + # The port Conduit will be running on. You need to set up a reverse proxy in # your web server (e.g. apache or nginx), so all requests to /_matrix on port # 443 and 8448 will be forwarded to the Conduit instance running on this port @@ -40,12 +46,33 @@ allow_registration = true allow_federation = true +# Disable encryption, so no new encrypted rooms can be created. +# Note: Existing rooms will continue to work. +#allow_encryption = false + +# Allow room creation (doesn't apply to admin room members or appservices if disabled) +allow_room_creation = true + +# Set the default room version (Default: 6) +default_room_version = "6" + +# Allow the creation and joining of rooms Conduit doesn't fully support +allow_unstable_room_versions = false + +# Set emergency login password (Username: conduit) +#emergency_password = "YourPasswordHere" + # Enable the display name lightning bolt on registration. enable_lightning_bolt = true trusted_servers = ["matrix.org"] +# Enable jaeger to support monitoring and troubleshooting through jaeger. +#allow_jaeger=false + #max_concurrent_requests = 100 # How many requests Conduit sends to other servers at the same time + +# Set log level #log = "info,state_res=warn,rocket=off,_=off,sled=off" address = "127.0.0.1" # This makes sure Conduit can only be reached using the reverse proxy