docker-compose/kopia/docker-compose.yml
2024-03-20 11:25:56 +01:00

60 lines
1.8 KiB
YAML

version: '3.7'
# on naspi for remote docker stop commands:
# sudo visudo
# thord ALL=(ALL) NOPASSWD: /bin/systemctl start docker, /bin/systemctl stop docker
services:
kopia:
image: kopia/kopia:latest
hostname: kopia-host
container_name: kopia
restart: unless-stopped
networks:
vlan:
ipv4_address: 192.168.1.102
ports:
- 51515:51515
command:
- server
- start
- --disable-csrf-token-checks
- --insecure
- --address=0.0.0.0:51515
- --server-username=${KOPIA_USER_NAME}
- --server-password=${KOPIA_USER_PASSWORD}
environment:
# Set repository password
KOPIA_PASSWORD: "${KOPIA_PASSWORD}"
USER: "User"
volumes:
# Mount local folders needed by kopia
- /opt/kopia/config:/app/config
- /opt/kopia/cache:/app/cache
- /opt/kopia/logs:/app/logs
# Use NFS volume for storage
- nfs-naspi:/data/naspi:ro
# Mount repository location locally
- /opt/kopia/repository:/repository
# Mount path for browsing mounted snapshots
- /tmp:/tmp:shared
- /home/thord/.config/rclone:/app/rclone
- /usr/bin/rclone:/app/rclone-bin
volumes:
nfs-naspi:
driver: local
driver_opts:
type: nfs
o: addr=${NFS_SERVER_IP},ro,nolock
device: ":/mnt/data"
networks:
vlan:
driver: macvlan
driver_opts:
parent: eno1 # Adjust the parent interface based on your host configuration
ipam:
config:
- subnet: 192.168.1.0/24
gateway: 192.168.1.1 # Adjust the gateway based on your network configuration