matrix-webhook/tests/Dockerfile

37 lines
1.5 KiB
Text
Raw Normal View History

2021-07-11 10:17:09 -04:00
# Leverage a synapse base to be able to:
# "from synapse._scripts.register_new_matrix_user import request_registration"
2021-06-16 19:23:25 -04:00
FROM matrixdotorg/synapse
2021-07-13 04:51:41 -04:00
# The config dir defaults to /data which is a volume made to keep data.
2021-07-11 10:17:09 -04:00
# Here, we want to trash those (and avoid the permission issues) by using something else
ENV SYNAPSE_CONFIG_DIR=/srv SYNAPSE_DATA_DIR=/srv SYNAPSE_SERVER_NAME=tests SYNAPSE_REPORT_STATS=no
2021-06-16 19:23:25 -04:00
2021-07-13 04:51:41 -04:00
# Generate configuration and keys for synapse
2021-06-16 19:23:25 -04:00
WORKDIR $SYNAPSE_CONFIG_DIR
2021-07-13 04:51:41 -04:00
RUN chown -R 991:991 . \
&& /start.py generate \
&& sed -i 's=/data=/srv=;s=8008=80=;s=#sup=sup=;' homeserver.yaml \
2022-08-01 17:33:41 -04:00
&& echo "" >> homeserver.yaml \
&& echo "rc_message:" >> homeserver.yaml \
&& echo " burst_count: 1000" >> homeserver.yaml \
&& echo "rc_registration:" >> homeserver.yaml \
&& echo " burst_count: 1000" >> homeserver.yaml \
&& echo "rc_registration_token_validity:" >> homeserver.yaml \
&& echo " burst_count: 1000" >> homeserver.yaml \
&& echo "rc_login:" >> homeserver.yaml \
&& echo " address:" >> homeserver.yaml \
&& echo " burst_count: 1000" >> homeserver.yaml \
&& echo " account:" >> homeserver.yaml \
&& echo " burst_count: 1000" >> homeserver.yaml \
&& echo " failed_attempts:" >> homeserver.yaml \
&& echo " burst_count: 1000" >> homeserver.yaml \
&& echo "rc_joins:" >> homeserver.yaml \
&& echo " burst_count: 1000" >> homeserver.yaml \
2021-07-13 04:51:41 -04:00
&& python -m synapse.app.homeserver --config-path homeserver.yaml --generate-keys
2021-06-16 19:23:25 -04:00
2021-07-12 19:16:24 -04:00
RUN pip install --no-cache-dir markdown matrix-nio httpx coverage
2021-06-16 19:23:25 -04:00
2021-07-11 10:17:09 -04:00
WORKDIR /app
2021-07-13 04:28:40 -04:00
2021-07-14 14:00:52 -04:00
CMD ./tests/start.py -vvv