diff --git a/src/_static/compose.yaml b/src/_static/compose.yaml index 712b693e..553980ad 100644 --- a/src/_static/compose.yaml +++ b/src/_static/compose.yaml @@ -73,6 +73,10 @@ services: pg-gvm: image: registry.community.greenbone.net/community/pg-gvm:stable restart: on-failure:10 + post_start: + # Docker container restarts or crashes leave stale locks, causing "Permission denied" or "already exists" errors on restart. + - command: ["sh", "-c", "rm -f /var/run/postgresql/.s.PGSQL.* /tmp/.s.PGSQL.*"] + user: root volumes: - psql_data_vol:/var/lib/postgresql - psql_socket_vol:/var/run/postgresql