From e466404b4fee1b89cf2d91544fcb06ab6fe02a90 Mon Sep 17 00:00:00 2001 From: Till Faelligen <2353100+S7evinK@users.noreply.github.com> Date: Thu, 15 Aug 2024 14:22:50 +0200 Subject: [PATCH] Fix paths, remove logging (for now), disable passwords --- docker/conf-workers/supervisord.conf.j2 | 12 ++----- .../conf-workers/synapse.supervisord.conf.j2 | 32 ++++++------------- docker/conf/homeserver.yaml | 6 ++-- 3 files changed, 14 insertions(+), 36 deletions(-) diff --git a/docker/conf-workers/supervisord.conf.j2 b/docker/conf-workers/supervisord.conf.j2 index da93358051..0ff6970671 100644 --- a/docker/conf-workers/supervisord.conf.j2 +++ b/docker/conf-workers/supervisord.conf.j2 @@ -11,24 +11,16 @@ files = /etc/supervisor/conf.d/*.conf [program:nginx] command=/usr/local/bin/prefix-log /usr/sbin/nginx -g "daemon off;" priority=500 -stdout_logfile=/dev/stdout -stdout_logfile_maxbytes=0 -stderr_logfile=/dev/stderr -stderr_logfile_maxbytes=0 username=www-data autorestart=true [program:redis] {% if using_unix_sockets %} -command=/usr/local/bin/prefix-log /usr/local/bin/redis-server --unixsocket /tmp/redis.sock +command=/usr/local/bin/prefix-log /usr/bin/redis-server --unixsocket /tmp/redis.sock {% else %} -command=/usr/local/bin/prefix-log /usr/local/bin/redis-server +command=/usr/local/bin/prefix-log /usr/bin/redis-server {% endif %} priority=1 -stdout_logfile=/dev/stdout -stdout_logfile_maxbytes=0 -stderr_logfile=/dev/stderr -stderr_logfile_maxbytes=0 username=redis autorestart=true diff --git a/docker/conf-workers/synapse.supervisord.conf.j2 b/docker/conf-workers/synapse.supervisord.conf.j2 index 481eb4fc92..c741b22432 100644 --- a/docker/conf-workers/synapse.supervisord.conf.j2 +++ b/docker/conf-workers/synapse.supervisord.conf.j2 @@ -1,52 +1,38 @@ {% if use_forking_launcher %} [program:synapse_fork] -command=/usr/local/bin/python -m synapse.app.complement_fork_starter +command=/usr/local/bin/prefix-log /root/synapse/env/bin/python -m synapse.app.complement_fork_starter {{ main_config_path }} synapse.app.homeserver --config-path="{{ main_config_path }}" - --config-path=/conf/workers/shared.yaml + --config-path=/root/synapse/config/workers/shared.yaml {%- for worker in workers %} -- {{ worker.app }} --config-path="{{ main_config_path }}" - --config-path=/conf/workers/shared.yaml - --config-path=/conf/workers/{{ worker.name }}.yaml + --config-path=/root/synapse/config/workers/shared.yaml + --config-path=/root/synapse/config/workers/{{ worker.name }}.yaml {%- endfor %} -stdout_logfile=/dev/stdout -stdout_logfile_maxbytes=0 -stderr_logfile=/dev/stderr -stderr_logfile_maxbytes=0 autorestart=unexpected exitcodes=0 {% else %} [program:synapse_main] -command=/usr/local/bin/prefix-log /usr/local/bin/python -m synapse.app.homeserver +command=/usr/local/bin/prefix-log /root/synapse/env/bin/python -m synapse.app.homeserver --config-path="{{ main_config_path }}" - --config-path=/conf/workers/shared.yaml + --config-path=/root/synapse/config/workers/shared.yaml priority=10 -# Log startup failures to supervisord's stdout/err -# Regular synapse logs will still go in the configured data directory -stdout_logfile=/dev/stdout -stdout_logfile_maxbytes=0 -stderr_logfile=/dev/stderr -stderr_logfile_maxbytes=0 autorestart=unexpected exitcodes=0 {% for worker in workers %} [program:synapse_{{ worker.name }}] -command=/usr/local/bin/prefix-log /usr/local/bin/python -m {{ worker.app }} +command=/usr/local/bin/prefix-log /root/synapse/env/bin/python -m {{ worker.app }} --config-path="{{ main_config_path }}" - --config-path=/conf/workers/shared.yaml - --config-path=/conf/workers/{{ worker.name }}.yaml + --config-path=/root/synapse/config/workers/shared.yaml + --config-path=/root/synapse/config/workers/{{ worker.name }}.yaml autorestart=unexpected priority=500 exitcodes=0 -stdout_logfile=/dev/stdout -stdout_logfile_maxbytes=0 -stderr_logfile=/dev/stderr -stderr_logfile_maxbytes=0 {% endfor %} {% endif %} diff --git a/docker/conf/homeserver.yaml b/docker/conf/homeserver.yaml index 2890990705..76b0762df6 100644 --- a/docker/conf/homeserver.yaml +++ b/docker/conf/homeserver.yaml @@ -92,7 +92,7 @@ federation_rc_concurrent: 3 ## Files ## -media_store_path: "/data/media" +media_store_path: "/root/synapse/data/media" max_upload_size: "{{ SYNAPSE_MAX_UPLOAD_SIZE or "50M" }}" max_image_pixels: "32M" dynamic_thumbnails: false @@ -179,7 +179,7 @@ macaroon_secret_key: "{{ SYNAPSE_MACAROON_SECRET_KEY }}" ## Signing Keys ## -signing_key_path: "/data/{{ SYNAPSE_SERVER_NAME }}.signing.key" +signing_key_path: "/root/synapse/data/{{ SYNAPSE_SERVER_NAME }}.signing.key" old_signing_keys: {} key_refresh_interval: "1d" # 1 Day. @@ -190,4 +190,4 @@ trusted_key_servers: "ed25519:auto": "Noi6WqcDj0QmPxCNQqgezwTlBKrfqehY1u2FyWP9uYw" password_config: - enabled: true + enabled: false