Remove comments
This commit is contained in:
@@ -1,63 +1,42 @@
|
||||
# Gitea Git Service with PostgreSQL Database Configuration
|
||||
services:
|
||||
# PostgreSQL Database Service
|
||||
gitea_db:
|
||||
# Basic container configuration
|
||||
container_name: gitea_db
|
||||
image: docker.io/library/postgres:17.5
|
||||
restart: unless-stopped
|
||||
|
||||
# Database credentials and configuration
|
||||
environment:
|
||||
- POSTGRES_USER=${POSTGRES_USER} # Database admin username
|
||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD} # Database admin password
|
||||
- POSTGRES_DB=${POSTGRES_DB} # Database name for Gitea
|
||||
|
||||
# Persistent storage configuration
|
||||
- POSTGRES_USER=${POSTGRES_USER}
|
||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
||||
- POSTGRES_DB=${POSTGRES_DB}
|
||||
volumes:
|
||||
- ${APPDATA_PATH}/gitea/db:/var/lib/postgresql/data
|
||||
|
||||
# Network port configuration
|
||||
ports:
|
||||
- ${DB_PORT}:5432 # Maps host port to PostgreSQL
|
||||
|
||||
# Health check configuration
|
||||
- ${DB_PORT}:5432
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -d ${POSTGRES_DB} -U ${POSTGRES_USER}"]
|
||||
start_period: 10s # Initial delay before checks
|
||||
interval: 10s # Check interval
|
||||
timeout: 5s # Check timeout
|
||||
retries: 3 # Allowed retries
|
||||
start_period: 10s
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
|
||||
# Gitea Server Service
|
||||
gitea_server:
|
||||
# Basic container configuration
|
||||
container_name: gitea_server
|
||||
image: docker.io/gitea/gitea:1.24.3-rootless
|
||||
restart: unless-stopped
|
||||
|
||||
# Service dependencies
|
||||
depends_on:
|
||||
gitea_db:
|
||||
condition: service_healthy # Requires healthy database
|
||||
|
||||
# Runtime configuration
|
||||
user: ${PUID}:${PGID} # Runs as specified user/group
|
||||
condition: service_healthy
|
||||
user: ${PUID}:${PGID}
|
||||
environment:
|
||||
- GITEA__database__DB_TYPE=postgres # Database type
|
||||
- GITEA__database__HOST=gitea_db:5432 # Database host
|
||||
- GITEA__database__NAME=${POSTGRES_DB} # Database name
|
||||
- GITEA__database__USER=${POSTGRES_USER} # Database username
|
||||
- GITEA__database__PASSWD=${POSTGRES_PASSWORD} # Database password
|
||||
|
||||
# Persistent storage configuration
|
||||
- GITEA__database__DB_TYPE=postgres
|
||||
- GITEA__database__HOST=gitea_db:5432
|
||||
- GITEA__database__NAME=${POSTGRES_DB}
|
||||
- GITEA__database__USER=${POSTGRES_USER}
|
||||
- GITEA__database__PASSWD=${POSTGRES_PASSWORD}
|
||||
volumes:
|
||||
- ${APPDATA_PATH}/gitea/config:/etc/gitea
|
||||
- ${APPDATA_PATH}/gitea/data:/var/lib/gitea
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
|
||||
# Network port configuration
|
||||
ports:
|
||||
- ${SERVER_PORT}:3000 # Maps host port to Gitea web interface
|
||||
- ${SSH_PORT}:22 # Maps host port to Gitea SSH
|
||||
- ${SERVER_PORT}:3000
|
||||
- ${SSH_PORT}:22
|
||||
|
Reference in New Issue
Block a user