Files
ai-stack-deployer/kopia-compose.yaml
Oussama Douhou 8977a6fdee New design v0.2
New design and framework
2026-01-13 10:49:47 +01:00

93 lines
2.1 KiB
YAML

version: '3.7'
services:
kopia:
image: kopia/kopia:latest
hostname: kopia-backup
container_name: kopia
restart: unless-stopped
# No direct port exposure - Traefik will handle routing
expose:
- 51515
command:
- server
- start
- --address=0.0.0.0:51515
- --server-username=${KOPIA_SERVER_USERNAME:-admin}
- --server-password=${KOPIA_SERVER_PASSWORD}
- --override-hostname=kopia-backup
- --override-username=root
environment:
# Repository password (REQUIRED - set in Dokploy environment)
KOPIA_PASSWORD: "${KOPIA_REPO_PASSWORD}"
# System configuration
USER: "root"
TZ: "Europe/Amsterdam"
# Logging configuration
KOPIA_LOG_LEVEL: "info"
KOPIA_LOG_DIR: "/app/logs"
# Performance tuning
KOPIA_CACHE_DIRECTORY: "/app/cache"
KOPIA_CONFIG_PATH: "/app/config/repository.config"
volumes:
# Persistent data volumes (all external)
- kopia-config:/app/config
- kopia-cache:/app/cache
- kopia-logs:/app/logs
- kopia-tmp:/tmp:shared
# Backup targets (read-only for safety)
# Uncomment and customize based on your backup needs
# - /etc/dokploy:/data/dokploy:ro
# - /var/lib/docker/volumes:/data/docker-volumes:ro
# - /root/.ssh:/data/ssh-keys:ro
networks:
- dokploy-network
# Health check configuration
healthcheck:
test: ["CMD", "sh", "-c", "wget -q --spider http://localhost:51515/api/v1/repo/status || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
# Resource limits (adjust based on backup load)
deploy:
resources:
limits:
memory: 2G
cpus: '2.0'
reservations:
memory: 512M
cpus: '0.5'
volumes:
kopia-config:
external: true
name: kopia-config
kopia-cache:
external: true
name: kopia-cache
kopia-logs:
external: true
name: kopia-logs
kopia-tmp:
external: true
name: kopia-tmp
networks:
dokploy-network:
external: true