docker/kopia/docker-compose.yml
deceivedhornet ad0f20f17a Kopia test
2025-11-18 00:21:24 -05:00

51 lines
No EOL
1.6 KiB
YAML

services:
kopia:
image: kopia/kopia:latest
container_name: kopia
hostname: kopia-server
environment:
# Reads the password from the .env file
- KOPIA_REPOSITORY_PASSWORD=${KOPIA_REPOSITORY_PASSWORD}
# --- User/Group Permissions ---
# These are still good practice, even on Windows.
# 1000 is a common default.
- PUID=1000
- PGID=1000
- KOPIA_SERVER_USERNAME=${KOPIA_SERVER_USERNAME}
- KOPIA_SERVER_PASSWORD=${KOPIA_SERVER_PASSWORD}
ports:
# Exposes the Kopia Web UI on port 51515
- "51515:51515"
volumes:
# --- Kopia Internal Config/Cache ---
# These stay as Docker-managed volumes.
- kopia_config:/app/config
- kopia_cache:/app/cache
- kopia_logs:/app/logs
# --- YOUR BACKUP DESTINATION ---
# Maps your host's F:\test_backup to /app/repository inside the container.
# Kopia will write its backup data here.
- f:/test_backup:/app/repository
# --- YOUR SOURCE DATA ---
# Maps your host's E:\installers to /source/installers inside the container.
# ':ro' (read-only) is a safety best practice.
- e:/installers:/source/installers:ro
command:
- server
- start
- --ui
- --address=0.0.0.0:51515
- --insecure
- --server-username=${KOPIA_SERVER_USERNAME}
- --server-password=${KOPIA_SERVER_PASSWORD}
restart: unless-stopped
# Defines the Docker-managed volumes for config/cache/logs
# The repository is no longer here because it's a direct host mount.
volumes:
kopia_config:
kopia_cache:
kopia_logs: