29 lines
914 B
Text
29 lines
914 B
Text
[Unit]
|
|
Description=Mastodon Web Service
|
|
Requires=postgresql.service mastodon-dfdb.service
|
|
After=postgresql.service mastodon-dfdb.service
|
|
|
|
[Container]
|
|
Image=ghcr.io/synth-download/mastodon:nightly
|
|
ContainerName=mastodon-web
|
|
EnvironmentFile=/etc/containers/systemd/mastodon/.env.secrets
|
|
EnvironmentFile=/etc/containers/systemd/mastodon/.env
|
|
Exec=bundle exec puma -C config/puma.rb
|
|
Network=mastodon.network
|
|
Network=postgresql.network
|
|
PublishPort=127.0.0.1:46098:3000
|
|
Volume=/var/containers/mastodon/public/system:/mastodon/public/system:z
|
|
Volume=/var/containers/mastodon/init/disable_ssl.rb:/mastodon/config/initializers/disable_ssl.rb:ro,z
|
|
Volume=/var/containers/mastodon/shared:/shared:z
|
|
# Health
|
|
HealthCmd=curl -s --noproxy localhost localhost:3000/health | grep -q 'OK' || exit 1
|
|
HealthOnFailure=kill
|
|
HealthStartPeriod=1m
|
|
Notify=healthy
|
|
|
|
[Service]
|
|
Restart=always
|
|
RestartSec=10s
|
|
|
|
[Install]
|
|
WantedBy=default.target
|