forked from ramimbo/mergework
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
46 lines (43 loc) · 1016 Bytes
/
docker-compose.yml
File metadata and controls
46 lines (43 loc) · 1016 Bytes
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
services:
app:
build: .
restart: unless-stopped
env_file:
- .env
volumes:
- /srv/mergework/data:/srv/mergework/data
expose:
- "8000"
caddy:
image: caddy:2.8
restart: unless-stopped
depends_on:
- app
ports:
- "80:80"
- "443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
- caddy-data:/data
- caddy-config:/config
backup:
image: alpine:3.20
restart: unless-stopped
volumes:
- /srv/mergework/data:/data:ro
- /srv/mergework/backups:/backups
command:
- /bin/sh
- -c
- |
apk add --no-cache sqlite >/dev/null
while true; do
if [ -f /data/mergework.sqlite3 ]; then
sqlite3 /data/mergework.sqlite3 ".backup '/backups/mergework-$$(date -u +%Y%m%dT%H%M%SZ).sqlite3'"
find /backups -type f -name 'mergework-*.sqlite3' -mtime +14 -delete
fi
sleep 86400
done
volumes:
caddy-data:
caddy-config: