diff --git a/conduwuit/hooks/init b/conduwuit/hooks/init new file mode 100755 index 0000000..3d2f6a4 --- /dev/null +++ b/conduwuit/hooks/init @@ -0,0 +1,12 @@ +#!/bin/bash + +## Init is run on host +## For now it is run every time the script is launched, but +## it should be launched only once after build. + +## Accessible variables are: +## - SERVICE_NAME Name of current service +## - DOCKER_BASE_IMAGE Base image from which this service might be built if any +## - SERVICE_DATASTORE Location on host of the DATASTORE of this service +## - SERVICE_CONFIGSTORE Location on host of the CONFIGSTORE of this service + diff --git a/conduwuit/hooks/web_proxy-relation-joined b/conduwuit/hooks/web_proxy-relation-joined new file mode 100755 index 0000000..61cab4a --- /dev/null +++ b/conduwuit/hooks/web_proxy-relation-joined @@ -0,0 +1,16 @@ +#!/bin/bash + +set -e + +DOMAIN=$(relation-get domain) || exit 1 + +config-add "\ +services: + $MASTER_BASE_SERVICE_NAME: + environment: + CONDUWUIT_SERVER_NAME: \"$DOMAIN\" + CONDUWUIT_WELL_KNOWN: | + { + server=$DOMAIN:443 + } +" diff --git a/conduwuit/metadata.yml b/conduwuit/metadata.yml new file mode 100644 index 0000000..a3e8249 --- /dev/null +++ b/conduwuit/metadata.yml @@ -0,0 +1,34 @@ +maintainer: "Valentin Lab " +docker-image: docker.0k.io/conduwuit:0.4.6 +config-resources: + - /etc/conduwuit/conduwuit.toml +data-resources: + - /var/lib/conduwuit + +docker-compose: + environment: + CONDUWUIT_ALLOW_CHECK_FOR_UPDATES: 'false' + CONDUWUIT_CONFIG: '/etc/conduwuit/conduwuit.toml' + CONDUWUIT_DATABASE_PATH: /var/lib/conduwuit + CONDUWUIT_ADDRESS: 0.0.0.0 ## Required as otherwise it is localhost + CONDUWUIT_PORT: 6167 + +default-options: + allow-registration: false + +uses: + # log-rotate: + # constraint: recommended + # auto: pair + # solves: + # disk-leak: "/data/logs" + web-proxy: + constraint: recommended + auto: pair + solves: + proxy: "Public access" + default-options: + target: !var-expand ${MASTER_BASE_SERVICE_NAME}:6167 + ## ``nocanon`` is mandatory + ## see: https://github.com/matrix-org/synapse/blob/master/docs/reverse_proxy.rst + apache-proxy-pass-options: retry=0 nocanon