feat: add DB service block to docker-compose-gitea template

Add DB_SERVICE_START/END markers for the database container and
DB_DEPENDS_START/END for the gitea service depends_on. Phase scripts
strip these blocks for sqlite3 and populate DB-specific vars
(image, env, healthcheck, data dir) for mysql/postgres/mssql.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
S
2026-03-01 10:16:37 -05:00
parent 5be95ff98a
commit 35aeb504c4

View File

@@ -1,14 +1,36 @@
# Gitea Docker Compose — rendered by phase1_gitea_unraid.sh and phase2_gitea_fedora.sh # Gitea Docker Compose — rendered by phase1_gitea_unraid.sh and phase2_gitea_fedora.sh
# Variables: GITEA_VERSION, DATA_PATH, GITEA_PORT, GITEA_SSH_PORT # Variables: GITEA_VERSION, DATA_PATH, GITEA_PORT, GITEA_SSH_PORT
# DATA_PATH is host-specific (UNRAID_GITEA_DATA_PATH or FEDORA_GITEA_DATA_PATH) # DATA_PATH is host-specific (UNRAID_GITEA_DATA_PATH or FEDORA_GITEA_DATA_PATH)
# DB_SERVICE block is stripped for sqlite3, kept for mysql/postgres/mssql.
version: "3" version: "3"
services: services:
# DB_SERVICE_START
db:
image: ${DB_DOCKER_IMAGE}
container_name: gitea-db
restart: unless-stopped
environment:
${DB_ENV_VARS}
volumes:
- ${DATA_PATH}/db:/var/lib/${DB_DATA_DIR}
healthcheck:
test: ${DB_HEALTHCHECK}
interval: 10s
timeout: 5s
retries: 5
# DB_SERVICE_END
gitea: gitea:
image: gitea/gitea:${GITEA_VERSION} image: gitea/gitea:${GITEA_VERSION}
container_name: gitea container_name: gitea
restart: unless-stopped restart: unless-stopped
# DB_DEPENDS_START
depends_on:
db:
condition: service_healthy
# DB_DEPENDS_END
environment: environment:
- USER_UID=1000 - USER_UID=1000
- USER_GID=1000 - USER_GID=1000