fix(forgejo,vaultwarden): restart with postgresql

As it has been discovered, regular update of postgresql cause issues when
the database gets restarted, cause the containers can no longer correctly
resolve the hostname and reconnect, therefore use ‹PartOf› to truly¹
force a restart of the container once the database gets restarted.

¹ Tried to fix a similar issue once already in 737acfd, based on the
  observations, I have failed…

Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
Matej Focko 2025-02-28 09:03:43 +01:00
parent 2a1bc28205
commit 929ba2a26d
Signed by: mfocko
SSH key fingerprint: SHA256:icm0fIOSJUpy5+1x23sfr+hLtF9UhY8VpMC7H4WFJP8
2 changed files with 2 additions and 0 deletions
roles
forgejo/templates
vaultwarden/templates

View file

@ -4,6 +4,7 @@
Description=Forgejo
After=postgresql.service
Requires=postgresql.service
PartOf=postgresql.service
[Container]
ContainerName=forgejo

View file

@ -4,6 +4,7 @@
Description=Vaultwarden
After=postgresql.service
Requires=postgresql.service
PartOf=postgresql.service
[Container]
ContainerName=vaultwarden