Files
docker-compose/opengist/docker-compose.yml
T

79 lines
2.7 KiB
YAML
Raw Normal View History

2025-07-14 12:48:15 +05:30
# OpenGist Git Snippet Service Configuration
2025-07-04 22:30:46 +05:30
services:
2025-07-14 12:48:15 +05:30
# PostgreSQL Database Service
2025-07-04 22:30:46 +05:30
opengist_db:
2025-07-14 12:48:15 +05:30
# Basic container configuration
2025-07-04 22:30:46 +05:30
container_name: opengist_db
2025-07-13 18:35:45 +05:30
image: docker.io/library/postgres:17.5
restart: unless-stopped
2025-07-14 12:48:15 +05:30
# Database credentials
2025-07-04 22:30:46 +05:30
environment:
2025-07-14 12:48:15 +05:30
- POSTGRES_USER=${POSTGRES_USER} # Database username
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD} # Database password
- POSTGRES_DB=${POSTGRES_DB} # Database name
# Persistent storage configuration
2025-07-04 22:30:46 +05:30
volumes:
2025-07-14 12:48:15 +05:30
- ${APPDATA_PATH}/opengist/db:/var/lib/postgresql/data # Database files
# Network configuration
2025-07-04 22:30:46 +05:30
ports:
2025-07-14 12:48:15 +05:30
- ${DB_PORT}:5432 # PostgreSQL port
# Health monitoring
2025-07-04 22:30:46 +05:30
healthcheck:
2025-07-07 11:56:01 +05:30
test: ["CMD-SHELL", "pg_isready -d ${POSTGRES_DB} -U ${POSTGRES_USER}"]
2025-07-14 12:48:15 +05:30
interval: 10s # Check frequency
timeout: 5s # Timeout duration
retries: 3 # Retry attempts
start_period: 10s # Initial delay
2025-07-04 22:30:46 +05:30
2025-07-14 12:48:15 +05:30
# OpenGist Application Service
2025-07-04 22:30:46 +05:30
opengist_server:
2025-07-14 12:48:15 +05:30
# Basic container configuration
2025-07-04 22:30:46 +05:30
container_name: opengist_server
2025-07-13 18:35:45 +05:30
image: ghcr.io/thomiceli/opengist:1.10.0
restart: unless-stopped
2025-07-14 12:48:15 +05:30
# Service dependencies
2025-07-04 22:30:46 +05:30
depends_on:
2025-07-04 22:32:31 +05:30
opengist_db:
2025-07-14 12:48:15 +05:30
condition: service_healthy # Wait for healthy database
# Runtime configuration
2025-07-04 22:30:46 +05:30
environment:
2025-07-14 12:48:15 +05:30
# User and group IDs for file permissions
- UID=${UID} # User ID for file permissions
- GID=${GID} # Group ID for file permissions
# Database connection
- OG_DB_URI=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@opengist_db:5432/${POSTGRES_DB} # PostgreSQL connection string
# Application settings
- OG_EXTERNAL_URL=${OG_EXTERNAL_URL} # Public URL for OpenGist
- OG_SECRET_KEY=${OG_SECRET_KEY} # Encryption key for sessions
# Git protocol configuration
- OG_HTTP_GIT_ENABLED=${OG_HTTP_GIT_ENABLED} # Enable HTTP Git access
- OG_SSH_GIT_ENABLED=${OG_SSH_GIT_ENABLED} # Enable SSH Git access
# Gitea integration
- OG_GITEA_CLIENT_KEY=${OG_GITEA_CLIENT_KEY} # OAuth client key
- OG_GITEA_SECRET=${OG_GITEA_SECRET} # OAuth secret
- OG_GITEA_URL=${OG_GITEA_URL} # Gitea instance URL
- OG_GITEA_NAME=${OG_GITEA_NAME} # Gitea application name
# Customization
- OG_CUSTOM_STATIC_LINK_0_NAME=${OG_CUSTOM_STATIC_LINK_0_NAME} # Custom link name
- OG_CUSTOM_STATIC_LINK_0_PATH=${OG_CUSTOM_STATIC_LINK_0_PATH} # Custom link path
# Persistent storage configuration
2025-07-04 22:30:46 +05:30
volumes:
- ${APPDATA_PATH}/opengist/data:/opengist
2025-07-14 12:48:15 +05:30
# Network configuration
2025-07-04 22:30:46 +05:30
ports:
2025-07-14 12:48:15 +05:30
- ${SERVER_PORT}:6157 # Web interface port
- 2222:2222 # SSH port for Git operations