-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
74 lines (74 loc) · 2.92 KB
/
docker-compose.yaml
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
---
version: "3"
services:
one:
build:
context: .
dockerfile: Dockerfile
args:
# Alpine version
BASE_IMAGE_VERSION: "3.18"
# SpiderOak ONE version
SPIDEROAK_VERSION: "7.5.0"
# Container user id (should match your local user)
SPIDEROAK_UID: "${SPIDEROAK_UID:-1001}"
# Container user name
SPIDEROAK_USER: "${SPIDEROAK_USER:-spider}"
# Container group id (should match your local user)
SPIDEROAK_GID: "${SPIDEROAK_GID:-1001}"
# Container group name
SPIDEROAK_GROUP: "${SPIDEROAK_GROUP:-spider}"
# Mount point for writable configuration inside the container
SPIDEROAK_STATEDIR: &config "/STATE"
# Mount point for read-only backup root inside the container
# You should mount the volumes to backup under this folder
SPIDEROAK_BACKUPDIR: "/BACKUP"
restart: unless-stopped
user: "${SPIDEROAK_UID:-1001}:${SPIDEROAK_GID:-1001}"
privileged: true
volumes:
# Read-only configuration
# Create device config with
# "echo -n 'device' > ${ACCOUNT_CONFIGDIR}/spideroak_device.conf"
# Create anacron config with
# "echo -n 'SPIDEROAK_ANACRON=true' > ${ACCOUNT_CONFIGDIR}/spideroak_anacron.conf"
# "echo -n 'SPIDEROAK_ANACRON_RANDOM_DELAY=5' >> ${ACCOUNT_CONFIGDIR}/spideroak_anacron.conf"
# "echo -n 'SPIDEROAK_ANACRON_START_HOURS_RANGE=2-6' >> ${ACCOUNT_CONFIGDIR}/spideroak_anacron.conf"
# "echo -n 'SPIDEROAK_ANACRON_PERIOD=3' >> ${ACCOUNT_CONFIGDIR}/spideroak_anacron.conf"
# "echo -n 'SPIDEROAK_ANACRON_DELAY=30' >> ${ACCOUNT_CONFIGDIR}/spideroak_anacron.conf"
- type: bind
source: "${ACCOUNT_CONFIGDIR:?Configuration directory not set}"
target: "/docker/configs"
read_only: true
# Read-only base64 secrets
# Create user secret with
# "echo -n 'user' | base64 -e > ${ACCOUNT_SECRETDIR}/spideroak_user.conf"
# Create password secret with
# "echo -n 'pass' | base64 -e > ${ACCOUNT_SECRETDIR}/spideroak_password.conf"
- type: bind
source: "${ACCOUNT_SECRETDIR:?Secrets directory not set}"
target: "/docker/secrets"
read_only: true
# Read-only preferences directory
- type: bind
source: "${BACKUP_PREFERENCES:?Preferences directory not set}"
target: "/etc/SpiderOakONE"
read_only: true
# Persistent configuration
- type: bind
source: "${BACKUP_STATEDIR:?Writable state directory not set}"
target: *config
# List of volumes accessible for back up
# Targets should be mounted on top of $SPIDEROAK_BACKUPDIR
- type: bind
source: "/etc"
target: "/BACKUP/etc"
read_only: true
bind:
propagation: "rslave"
- type: bind
source: "/usr/local/bin"
target: "/BACKUP/usr/local/bin"
read_only: true
bind:
propagation: "rslave"