init server_name to be the sld
This commit is contained in:
@@ -21,7 +21,7 @@ ENV PATH="$VIRTUAL_ENV/bin:$PATH"
|
||||
# lxml - required for previews
|
||||
RUN pip install --upgrade pip && \
|
||||
pip install --upgrade setuptools && \
|
||||
pip install matrix-synapse==${VERSION} psycopg2-binary python-ldap matrix-synapse-ldap3 lxml
|
||||
pip install matrix-synapse==${VERSION} psycopg2-binary python-ldap matrix-synapse-ldap3 lxml publicsuffix2
|
||||
|
||||
RUN curl -sL https://github.com/mikefarah/yq/releases/download/3.2.1/yq_linux_amd64 -o /usr/bin/yq && \
|
||||
chmod +x /usr/bin/yq
|
||||
|
||||
5
start.sh
5
start.sh
@@ -23,11 +23,14 @@ if [[ ! -f /app/data/configs/homeserver.yaml ]]; then
|
||||
|
||||
mv /app/data/configs/${CLOUDRON_APP_DOMAIN}.signing.key /app/data/configs/signing.key
|
||||
|
||||
# this is set at installation time and not changed after
|
||||
server_name=$(python -c "from publicsuffix2 import get_sld; print(get_sld('${CLOUDRON_APP_DOMAIN}'));")
|
||||
yq w -i /app/data/configs/homeserver.yaml server_name "${CLOUDRON_APP_DOMAIN}"
|
||||
|
||||
yq w -i /app/data/configs/homeserver.yaml registration_shared_secret "$(pwgen -1s 64)"
|
||||
fi
|
||||
|
||||
echo "==> Configuring synapse"
|
||||
yq w -i /app/data/configs/homeserver.yaml server_name "${CLOUDRON_APP_DOMAIN}"
|
||||
yq w -i /app/data/configs/homeserver.yaml public_baseurl "${CLOUDRON_APP_ORIGIN}"
|
||||
|
||||
# tls
|
||||
|
||||
Reference in New Issue
Block a user