openbao: add a dormant OpenBao backend alongside SOPS #130
1 changed files with 13 additions and 1 deletions
|
|
@ -53,7 +53,19 @@ services:
|
|||
cpus: "${FORGEJO_DB_CPUS:-1}"
|
||||
memory: ${FORGEJO_DB_MEMORY:-1g}
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
# `any`, NOT `on-failure`. This took Forgejo down for 27 hours on 2026-07-29:
|
||||
# Postgres hit an invalid data-directory lock file ("could not open file
|
||||
# postmaster.pid ... performing immediate shutdown") and exited **0**. A clean
|
||||
# exit is not a failure, so Swarm considered the task Complete, dropped the
|
||||
# service to 0/1 replicas, and never rescheduled it. Forgejo itself stayed Up
|
||||
# and served its homepage while every repo page, the API and all CI returned
|
||||
# 500 with `dial tcp: lookup db ... no such host`.
|
||||
#
|
||||
# `on-failure` is the wrong policy for any always-on stateful service: it
|
||||
# cannot distinguish "finished successfully" from "shut itself down and should
|
||||
# be restarted", and Postgres does the latter with status 0 on several paths.
|
||||
condition: any
|
||||
delay: 5s
|
||||
|
||||
forgejo:
|
||||
image: codeberg.org/forgejo/forgejo:9-rootless
|
||||
|
|
|
|||
Loading…
Reference in a new issue