Deploy enables the instance unit
A host reboot on 2026-08-30 left the instance down: deploys only ever started it. enable is best-effort until the host's polkit rule grants manage-unit-files to deploy-runner. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
1dcf8118d2
commit
1bb73aa37a
@@ -85,9 +85,16 @@ jobs:
|
|||||||
# No sudo: the runner's unit sets NoNewPrivileges=yes - systemctl
|
# No sudo: the runner's unit sets NoNewPrivileges=yes - systemctl
|
||||||
# talks to PID1 over D-Bus, authorized by the polkit rule scoped
|
# talks to PID1 over D-Bus, authorized by the polkit rule scoped
|
||||||
# to deploy-runner + the app@* unit pattern.
|
# to deploy-runner + the app@* unit pattern.
|
||||||
|
# enable: the unit must come back after a host reboot (2026-08-30 a
|
||||||
|
# reboot left both portal instances down - deploys had only ever
|
||||||
|
# started them). Needs the manage-unit-files polkit grant; until
|
||||||
|
# that's on the host the enable is reported and skipped, never a
|
||||||
|
# failed deploy.
|
||||||
- name: Activate and restart
|
- name: Activate and restart
|
||||||
run: |
|
run: |
|
||||||
ln -sfn "/srv/app/$INSTANCE/releases/$PORTAL_RELEASE" /srv/app/$INSTANCE/current
|
ln -sfn "/srv/app/$INSTANCE/releases/$PORTAL_RELEASE" /srv/app/$INSTANCE/current
|
||||||
|
systemctl enable app@$INSTANCE.service \
|
||||||
|
|| echo "::warning::could not enable app@$INSTANCE (polkit) - unit will not survive a reboot"
|
||||||
systemctl restart app@$INSTANCE.service
|
systemctl restart app@$INSTANCE.service
|
||||||
|
|
||||||
# Apex and www are separate cookie scopes (no shared Domain
|
# Apex and www are separate cookie scopes (no shared Domain
|
||||||
|
|||||||
Reference in New Issue
Block a user