Docker Compose¶
The recommended way to deploy GitEcho for production use.
Minimal Setup¶
services:
gitecho:
image: ghcr.io/tobihochzwei/gitecho:latest
container_name: gitecho
restart: unless-stopped
ports:
- "3000:3000"
environment:
MASTER_KEY: "replace-with-64-hex-chars"
volumes:
- gitecho-data:/data
- gitecho-config:/config
- gitecho-backups:/backups
volumes:
gitecho-data:
gitecho-config:
gitecho-backups:
Generate the MASTER_KEY:
Start:
Full Configuration¶
services:
gitecho:
image: ghcr.io/tobihochzwei/gitecho:latest
container_name: gitecho
restart: unless-stopped
ports:
- "3000:3000"
environment:
MASTER_KEY: "${MASTER_KEY:?Generate with: openssl rand -hex 32}"
# Optional: match ownership of bind-mounted host directories
PUID: ${PUID:-}
PGID: ${PGID:-}
# Container timezone
TZ: ${TZ:-UTC}
# Reverse proxy origin(s)
PUBLIC_URL: ${PUBLIC_URL:-}
# Provider tokens (prefer the Settings UI instead)
GITHUB_PAT: ${GITHUB_PAT:-}
GITHUB_PAT_EXPIRES: ${GITHUB_PAT_EXPIRES:-}
AZUREDEVOPS_PAT: ${AZUREDEVOPS_PAT:-}
AZUREDEVOPS_PAT_EXPIRES: ${AZUREDEVOPS_PAT_EXPIRES:-}
GITLAB_PAT: ${GITLAB_PAT:-}
GITLAB_PAT_EXPIRES: ${GITLAB_PAT_EXPIRES:-}
GITLAB_HOST: ${GITLAB_HOST:-}
# Backup settings
BACKUP_MODE: ${BACKUP_MODE:-option1}
CRON_SCHEDULE: ${CRON_SCHEDULE:-0 2 * * *}
# SMTP notifications (optional)
SMTP_HOST: ${SMTP_HOST:-}
SMTP_PORT: ${SMTP_PORT:-587}
SMTP_USER: ${SMTP_USER:-}
SMTP_PASS: ${SMTP_PASS:-}
SMTP_FROM: ${SMTP_FROM:-}
SMTP_TO: ${SMTP_TO:-}
NOTIFY_ON_SUCCESS: ${NOTIFY_ON_SUCCESS:-false}
PAT_EXPIRY_WARN_DAYS: ${PAT_EXPIRY_WARN_DAYS:-14}
volumes:
- gitecho-data:/data
- gitecho-config:/config
- gitecho-backups:/backups
volumes:
gitecho-data:
gitecho-config:
gitecho-backups:
Create a .env file alongside docker-compose.yml:
Using Bind Mounts¶
Replace the named volumes with host paths:
Set PUID and PGID to match the host directory ownership: