Added stop_grace_period

master
Meliurwen 4 years ago
parent 0bc2be311a
commit a499eeb00f
Signed by: meliurwen
GPG Key ID: 818A8B35E9F1CE10
  1. 9
      .env.example
  2. 1
      docker-compose.yml

@ -17,11 +17,14 @@ GT_TAG=
GT_CONTAINER_NAME=
# Database
# If using PostgreSQL is better to use SIGINT to power off the container which
# enables the "Fast Shutdown" mode.
# If using PostgreSQL is better to use SIGTERM to power off the container which
# enables the "Smart Shutdown", after the grace period it gets SIGKILL which
# can lead to corruption of backups, but is still better than using SIGINT.
# https://www.postgresql.org/docs/10/server-shutdown.html
# https://github.com/docker-library/postgres/issues/184#issuecomment-394822161
# https://github.com/docker-library/postgres/issues/714#issuecomment-631306363
DB_IMG=
DB_TAG=
DB_CONTAINER_NAME=
DB_STOP_SIG=SIGINT
DB_STOP_SIG=
DB_STOP_GRC=30s

@ -32,6 +32,7 @@ services:
container_name: ${DB_CONTAINER_NAME:-gitea-db}
restart: unless-stopped
stop_signal: ${DB_STOP_SIG:-SIGTERM}
stop_grace_period: ${DB_STOP_GRC:-10s}
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWD}

Loading…
Cancel
Save