-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
32 lines (30 loc) · 963 Bytes
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
version: '3.8'
services:
swarmvault:
image: hipnologo/swarmvault:latest
deploy:
replicas: 1
restart_policy:
condition: on-failure
# Optional: Add resource constraints
resources:
limits:
cpus: '0.5'
memory: 512M
environment:
# Define any required environment variables here
# Example:
# BACKUP_DIR: "/app/backups"
# REMOTE_HOST: "user@remote_host"
# SYNC_PATH: "/remote/backup/path"
volumes:
# Mount the Docker socket to allow Docker CLI commands within the container
- /var/run/docker.sock:/var/run/docker.sock
# Mount a host directory to store backups persistently
- /path/to/local/backups:/app/backups
networks:
- backup_network
command: ["python", "swarmvault.py", "--backup-dir", "/app/backups", "--remote-host", "remote_host", "--sync-to", "/remote/backup/path"]
networks:
backup_network:
driver: overlay