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

95 lines
3.2 KiB
YAML
Raw Normal View History

2025-07-14 12:48:15 +05:30
# OpenGist with MariaDB Configuration
2025-07-07 11:56:01 +05:30
services:
2025-07-14 12:48:15 +05:30
# MariaDB Database Service
2025-07-07 11:56:01 +05:30
opengist_db:
2025-07-14 12:48:15 +05:30
# Basic container configuration
2025-07-07 11:56:01 +05:30
container_name: opengist_db
2025-07-13 18:35:45 +05:30
image: docker.io/library/mariadb:11.8.2
restart: unless-stopped
2025-07-14 12:48:15 +05:30
# Database performance tuning
2025-07-07 11:56:01 +05:30
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW --innodb-file-per-table=1 --skip-innodb-read-only-compressed
2025-07-14 12:48:15 +05:30
# Database credentials
2025-07-07 11:56:01 +05:30
environment:
2025-07-14 12:48:15 +05:30
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD} # Root password
- MYSQL_USER=${MYSQL_USER} # Application username
- MYSQL_PASSWORD=${MYSQL_PASSWORD} # Application password
- MYSQL_DATABASE=${MYSQL_DATABASE} # Database name
# Persistent storage configuration
2025-07-07 11:56:01 +05:30
volumes:
2025-07-14 12:48:15 +05:30
- ${APPDATA_PATH}/opengist/db:/var/lib/mysql # Database files
# Network configuration
2025-07-07 11:56:01 +05:30
ports:
2025-07-14 12:48:15 +05:30
- ${DB_PORT}:3306 # MariaDB port
2025-07-08 16:40:16 +05:30
networks:
2025-07-14 12:48:15 +05:30
- backend # Connects to backend network
# Health monitoring
2025-07-07 11:56:01 +05:30
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
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-07 11:56:01 +05:30
2025-07-14 12:48:15 +05:30
# OpenGist Application Service
2025-07-07 11:56:01 +05:30
opengist_server:
2025-07-14 12:48:15 +05:30
# Basic container configuration
2025-07-07 11:56:01 +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-07 11:56:01 +05:30
depends_on:
opengist_db:
2025-07-14 12:48:15 +05:30
condition: service_healthy # Wait for healthy database
# Runtime configuration
2025-07-07 11:56:01 +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=mysql://${MYSQL_USER}:${MYSQL_PASSWORD}@opengist_db:3306/${MYSQL_DATABASE} # MariaDB 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-07 11:56:01 +05:30
volumes:
- ${APPDATA_PATH}/opengist/data:/opengist
2025-07-14 12:48:15 +05:30
# Network configuration
2025-07-07 11:56:01 +05:30
ports:
2025-07-14 12:48:15 +05:30
- ${SERVER_PORT}:6157 # Web interface port
- 2222:2222 # SSH port for Git operations
2025-07-08 16:40:16 +05:30
networks:
2025-07-14 12:48:15 +05:30
- frontend # Connects to frontend network
- backend # Connects to backend network
2025-07-08 16:40:16 +05:30
2025-07-14 12:48:15 +05:30
# External network definitions
2025-07-08 16:40:16 +05:30
networks:
frontend:
2025-07-14 12:48:15 +05:30
external: true # Uses pre-existing network
2025-07-08 16:40:16 +05:30
backend:
2025-07-14 12:48:15 +05:30
external: true # Uses pre-existing network