coreos-home-server/service/spectrum/systemd/spectrum@.service
Alex Palaistras fff2b222bb 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.
2022-05-03 18:18:02 +01:00

26 lines
1.1 KiB
Desktop File

[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 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
NotifyAccess=all
SyslogIdentifier=%N
Restart=on-failure
Environment=PODMAN_SYSTEMD_UNIT=%n
Environment=SPECTRUM_HOSTNAME=%p-%i SPECTRUM_PROTOCOL=prpl-%i
ExecStart=/bin/podman run --replace --name %p-%i --net internal --sdnotify=conmon \
--env-file %E/coreos-home-server/%p/%p.env \
--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
[Install]
WantedBy=multi-user.target