Dockerfile for synapse
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

17 lines
837 B

#!/bin/sh
chown ${UID}:${GID} /data
[[ -z "${SERVER_NAME}" ]] && echo "STOP! environment variable SERVER_NAME must be set" && breakup="1"
[[ -z "${REPORT_STATS}" ]] && echo "STOP! environment variable REPORT_STATS must be set to 'no' or 'yes'" && breakup="1"
[[ "${REPORT_STATS}" != "yes" ]] && [[ "${REPORT_STATS}" != "no" ]] && \
echo "STOP! REPORT_STATS needs to be 'no' or 'yes'" && breakup="1"
[[ "${breakup}" == "1" ]] && exit 1
su-exec ${UID}:${GID} python2 -m synapse.app.homeserver \
-c /data/config/homeserver.yaml \
--generate-config \
-H ${SERVER_NAME} \
--report-stats ${REPORT_STATS}
sed -e 's#/homeserver.db#/data/database/homeserver.db#' \
-e 's#/homeserver.log#/data/log/homeserver.log#' \
-e 's#/media_store#/data/media_store#' \
-e 's#/uploads#/data/uploads#' -i /data/config/homeserver.yaml