mirror of
https://github.com/deuill/coreos-home-server.git
synced 2024-09-21 05:30:45 +00:00
spectrum: Add support for re-hosting shared media
This enables the `web_directory` and `web_url` options for Spectrum, which has media shared by legacy protocol buddies be re-hosted by Spectrum, and shared by a dedicated volume. This, in turn, is served by the `nginx-serve-volume@spectrum-media` service, which is intended to be proxied under the same host used for Prosody. Documentation for the integration will be added in future commits.
This commit is contained in:
parent
6ca42cad7e
commit
fff2b222bb
@ -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
|
||||
|
||||
|
@ -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}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user