diff --git a/docker-compose.yml b/docker-compose.yml index 0be0395..83f1c40 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -107,10 +107,35 @@ services: - db_user - db_pass - db_name + + db_pg17: + image: postgres:17 + container_name: gitea_db_pg17 + restart: unless-stopped + healthcheck: + test: [ "CMD-SHELL", "pg_isready -d `cat $$POSTGRES_DB_FILE` -U `cat $$POSTGRES_USER_FILE`" ] + start_period: 20s + interval: 30s + retries: 5 + timeout: 5s + volumes: + - db_pg17:/var/lib/postgresql/data + networks: + - internal + environment: + POSTGRES_DB_FILE: /run/secrets/db_name + POSTGRES_USER_FILE: /run/secrets/db_user + POSTGRES_PASSWORD_FILE: /run/secrets/db_pass + secrets: + - db_user + - db_pass + - db_name volumes: db: name: gitea_db + db_pg17: + name: gitea_db_pg17 data: name: gitea_data runner: