# Triggered by catcrafts-deploy.path when CI touches the deploy marker. # # Deliberately does exactly one thing. It is reachable from anything that can # write the marker file, so it must not be a general-purpose hook — no scripts # from the deployed tree, no arguments derived from the marker's contents. [Unit] Description=Restart catcrafts.net backend after a deploy Documentation=https://forgejo.catcrafts.net/Catcrafts/catcrafts.net [Service] Type=oneshot # Verify the freshly deployed binary before cutting over. --selftest exercises # the escaping and JSON layers that produce every byte of markup the site # emits; if it fails, the currently-running (working) server is left alone # rather than replaced with a broken one. ExecStartPre=/srv/catcrafts-app/catcrafts-server --selftest ExecStart=/usr/bin/systemctl restart catcrafts-server.service