diff --git a/service/spectrum/container/config/spectrum.cfg.template b/service/spectrum/container/config/spectrum.cfg.template index eb77117..4b9cedb 100644 --- a/service/spectrum/container/config/spectrum.cfg.template +++ b/service/spectrum/container/config/spectrum.cfg.template @@ -32,6 +32,10 @@ backend = /usr/bin/spectrum2_libpurple_backend # So for example: prpl-jabber.hanzz.k%gmail.com@domain.tld protocol = ${SPECTRUM_PROTOCOL} +# Where to re-host files uploaded by legacy protocol buddies, and which URL to return to XMPP. +web_directory=/var/lib/spectrum2-media +web_url=https://${PROSODY_HOST_EXTERNAL}/spectrum + # If enabled, your legacy network buddies will be removed when you unsubscribe from them in the XMPP. # enable_remove_buddy = true diff --git a/service/spectrum/spectrum.env.template b/service/spectrum/spectrum.env.template index a7009d6..0e437c7 100644 --- a/service/spectrum/spectrum.env.template +++ b/service/spectrum/spectrum.env.template @@ -7,3 +7,4 @@ SPECTRUM_REGISTRATION_ENABLED=1 # Options for Prosody component configuration. PROSODY_COMPONENT_PASSWORD=${PROSODY_SPECTRUM_PASSWORD} +PROSODY_HOST_EXTERNAL=${PROSODY_HOST_EXTERNAL} diff --git a/service/spectrum/systemd/spectrum@.service b/service/spectrum/systemd/spectrum@.service index c32100d..c143a0f 100644 --- a/service/spectrum/systemd/spectrum@.service +++ b/service/spectrum/systemd/spectrum@.service @@ -1,7 +1,8 @@ [Unit] Description=Spectrum IM Transport for XMPP (%i) -Wants=container-build@%p.service container-volume@%p-%i.service prosody.service prosody-component-register@%p-%i.service +Wants=container-build@%p.service container-volume@%p-%i.service prosody.service prosody-component-register@%p-%i.service nginx-serve-volume@%p-media.service After=container-build@%p.service container-volume@%p-%i.service prosody.service prosody-component-register@%p-%i.service +Before=nginx-serve-volume@%p-media.service [Service] Type=notify @@ -15,6 +16,7 @@ ExecStart=/bin/podman run --replace --name %p-%i --net internal --sdnotify=conmo --env SPECTRUM_HOSTNAME=${SPECTRUM_HOSTNAME} \ --env SPECTRUM_PROTOCOL=${SPECTRUM_PROTOCOL} \ --volume %p-%i:/var/lib/spectrum2:z \ + --volume %p-media:/var/lib/spectrum2-media:z \ localhost/%p:latest ExecStop=/bin/podman stop --ignore --time 10 %p-%i ExecStopPost=/bin/podman rm --ignore --force %p-%i