All checks were successful
Deploy / build-deploy (push) Successful in 4m19s
30 lines
1.3 KiB
Desktop File
30 lines
1.3 KiB
Desktop File
# 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. The unit tests run
|
|
# in CI (crafter-build test) before anything is shipped, so what this gate
|
|
# checks is the part CI cannot: that THIS binary executes on THIS host — the
|
|
# dynamic loader finds libmsquic (the first real deploy died exactly there,
|
|
# exit 127) — and renders a page from the deployed content. If it fails, the
|
|
# currently-running (working) server is left alone rather than replaced with
|
|
# a broken one.
|
|
#
|
|
# WorkingDirectory because --render loads ./content; StandardOutput=null so
|
|
# the rendered HTML does not land in the journal on every deploy (stderr,
|
|
# where failures speak, still does).
|
|
WorkingDirectory=/srv/catcrafts-app
|
|
StandardOutput=null
|
|
StandardError=journal
|
|
ExecStartPre=/srv/catcrafts-app/catcrafts-server --render /
|
|
|
|
ExecStart=/usr/bin/systemctl restart catcrafts-server.service
|