commit ca4fac9134ecd2327c82a2de0ff19a8752e306b3 Author: Octopus Octopus Date: Mon Apr 1 18:54:43 2024 -0500 add mastodon-web diff --git a/mastodon-web.service b/mastodon-web.service new file mode 100644 index 0000000..9f8ed83 --- /dev/null +++ b/mastodon-web.service @@ -0,0 +1,20 @@ +[Unit] +Description=mastodon-web.service +Wants=network-online.target +After=NetworkManager.service network.target network-online.target +RequiresMountsFor=/var/lib/containers/storage /var/run/containers/storage + +# %E is "the XDG_CONFIG path" +#docker run --net external_network --net internal_network --restart always --env-file .env.production --health-cmd "CMD-SHELL,wget -q --spider --proxy=off localhost:3000/health || exit 1" -p 127.0.0.1:3000:3000 -v ./public/system:/mastodon/public/system ghcr.io/mastodon/mastodon:v4.2.7 bundle exec puma -C config/puma.rb +[Service] +Environment=PODMAN_SYSTEMD_UNIT=%n +Restart=on-failure +TimeoutStopSec=70 +ExecStart=/usr/bin/podman run --net external_network --net internal_network --restart always --env-file %h/live/.env.production --health-cmd "CMD-SHELL,wget -q --spider --proxy=off localhost:3000/health || exit 1" -p 127.0.0.1:3000:3000 -v %h/live/public/system localhost/jademoe bundle exec puma -C config/puma.rb --tag mastodon-web +ExecStop=/usr/bin/podman stop mastodon-web +ExecStopPost=/usr/bin/podman rm mastodon-web +Type=oneshot +RemainAfterExit=yes + +[Install] +WantedBy=default.target