-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.dev.yml
More file actions
105 lines (99 loc) · 2.54 KB
/
Copy pathcompose.dev.yml
File metadata and controls
105 lines (99 loc) · 2.54 KB
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: volkeep
services:
volkeep:
build: .
container_name: volkeep
read_only: true
cap_drop: [ALL]
security_opt: [no-new-privileges]
depends_on:
dsproxy:
condition: service_healthy
networks:
- dsproxy
healthcheck:
test: [CMD, /bin/pidcheck, --pid, "1"]
interval: 1m
retries: 3
timeout: 10s
start_period: 10s
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
environment:
VOLKEEP_SCHEDULE: 03:00
VOLKEEP_JITTER: 30m
VOLKEEP_HOST: dev
RESTIC_REPOSITORY: volume:volkeep_backup
RESTIC_PASSWORD: sample
DOCKER_HOST: tcp://dsproxy:2375
sample:
image: busybox:musl
container_name: volkeep-sample
restart: unless-stopped
command: sh -c "date > /data/log; trap exit TERM; sleep infinity & wait"
volumes:
- data:/data:rw
labels:
volkeep.enable: true
volkeep.stop: true
postgres:
image: postgres:18-alpine
container_name: volkeep-postgres
restart: unless-stopped
volumes:
- pgdata:/var/lib/postgresql:rw
- pgdump:/dump:rw
environment:
POSTGRES_DB: sample
POSTGRES_USER: sample
POSTGRES_PASSWORD: sample
labels:
volkeep.enable: true
volkeep.exec-pre: pg_dump -U sample -Fc -Z0 -f /dump/db.dump sample
volkeep.volumes: volkeep_pgdump
dsproxy:
image: wollomatic/socket-proxy:1
container_name: volkeep-dsproxy
restart: unless-stopped
read_only: true
cap_drop: [ALL]
security_opt: [no-new-privileges]
user: 0:0
networks:
- dsproxy
healthcheck:
test: [CMD, /healthcheck]
interval: 1m
retries: 3
timeout: 10s
start_period: 1m
volumes:
- ${XDG_RUNTIME_DIR:-/var/run}/docker.sock:/var/run/docker.sock:ro
environment:
SP_ALLOW_GET: /v1\..{1,2}/(version|_ping|containers/json|containers/[^/]+/logs|exec/[^/]+/json|images/.+/json)
SP_ALLOW_HEAD: /_ping
SP_ALLOW_POST: /v1\..{1,2}/(containers/create|containers/[^/]+/(start|stop|wait|exec)|exec/[^/]+/start|images/create)
SP_ALLOW_DELETE: /v1\..{1,2}/containers/[^/]+
SP_ALLOWFROM: volkeep
SP_ALLOWHEALTHCHECK: true
SP_LISTENIP: 0.0.0.0
SP_LOGLEVEL: WARN
SP_STOPONWATCHDOG: true
SP_WATCHDOGINTERVAL: 3600
networks:
dsproxy:
volumes:
backup:
data:
driver_opts:
type: tmpfs
device: tmpfs
pgdata:
driver_opts:
type: tmpfs
device: tmpfs
pgdump:
driver_opts:
type: tmpfs
device: tmpfs