Adding comprehensive comments
This commit is contained in:
@@ -1,28 +1,41 @@
|
||||
# Gitea Mirror Service Configuration
|
||||
services:
|
||||
gitea-mirror:
|
||||
# Basic container configuration
|
||||
container_name: gitea-mirror
|
||||
image: ghcr.io/raylabshq/gitea-mirror:v2.22.0
|
||||
restart: unless-stopped
|
||||
user: ${PUID}:${PGID}
|
||||
user: ${PUID}:${PGID} # Runs as specified user/group
|
||||
|
||||
# Application environment configuration
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- DATABASE_URL=file:data/gitea-mirror.db
|
||||
- HOST=0.0.0.0
|
||||
- PORT=4321
|
||||
- JWT_SECRET=${JWT_SECRET}
|
||||
- NODE_ENV=production # Runtime environment
|
||||
- DATABASE_URL=file:data/gitea-mirror.db # SQLite database location
|
||||
- HOST=0.0.0.0 # Binding address
|
||||
- PORT=4321 # Internal container port
|
||||
- JWT_SECRET=${JWT_SECRET} # Authentication secret
|
||||
|
||||
# Persistent storage configuration
|
||||
volumes:
|
||||
- ${APPDATA_PATH}/gitea-mirror/data:/app/data
|
||||
- ${APPDATA_PATH}/gitea-mirror/data:/app/data # Application data storage
|
||||
|
||||
# Network port configuration
|
||||
ports:
|
||||
- ${PORT}:4321
|
||||
- ${PORT}:4321 # Maps host port to container
|
||||
|
||||
# Network configuration
|
||||
networks:
|
||||
- internal
|
||||
- internal # Connects to internal network
|
||||
|
||||
# Health check configuration
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--no-verbose", "--tries=3", "--spider", "http://localhost:4321/api/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
start_period: 15s
|
||||
interval: 30s # Check interval
|
||||
timeout: 10s # Check timeout
|
||||
retries: 5 # Allowed retries
|
||||
start_period: 15s # Initial delay before checks
|
||||
|
||||
# External network definition
|
||||
networks:
|
||||
internal:
|
||||
external: true
|
||||
external: true # Uses pre-existing internal network
|
||||
|
Reference in New Issue
Block a user