Repository navigation
Expand file tree
/
Copy pathcompose.yaml
More file actions
96 lines (96 loc) · 3.27 KB
/
Copy pathcompose.yaml
File metadata and controls
96 lines (96 loc) · 3.27 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
services:
github-backup:
platform: linux/amd64
build:
context: .
platforms: [linux/amd64]
# Build this checkout; published images before this feature lack the scheduler.
entrypoint: ["python", "-m", "github_backup.scheduler"]
command: []
hostname: github-backup
restart: unless-stopped
init: true
read_only: true
cap_drop: [ALL]
security_opt: [no-new-privileges:true]
stop_grace_period: 90s
pids_limit: 128
cpus: "${BACKUP_CPUS:-0.5}"
mem_limit: ${BACKUP_MEMORY_LIMIT:-512m}
tmpfs:
- /tmp:rw,noexec,nosuid,size=64m,mode=1777
volumes:
- backup-cache:/cache
environment:
GITHUB_APP_ID: ${GITHUB_APP_ID:-}
GITHUB_APP_OWNERS: ${GITHUB_APP_OWNERS:-}
GITHUB_APP_PRIVATE_KEY_BASE64: ${GITHUB_APP_PRIVATE_KEY_BASE64:-}
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID:-}
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY:-}
AWS_EC2_METADATA_DISABLED: "true"
SPACES_BUCKET: ${SPACES_BUCKET:-}
SPACES_REGION: ${SPACES_REGION:-fra1}
SPACES_PREFIX: ${SPACES_PREFIX:-github-backup}
BACKUP_INTERVAL_HOURS: ${BACKUP_INTERVAL_HOURS:-1}
BACKUP_RETENTION: ${BACKUP_RETENTION:-3}
BACKUP_MAX_STORAGE_GIB: ${BACKUP_MAX_STORAGE_GIB:-100}
BACKUP_KEEP_WEEKLY: ${BACKUP_KEEP_WEEKLY:-2}
BACKUP_KEEP_MONTHLY: ${BACKUP_KEEP_MONTHLY:-2}
BACKUP_KEEP_OLDEST: ${BACKUP_KEEP_OLDEST:-true}
BACKUP_MANIFEST_RETENTION: ${BACKUP_MANIFEST_RETENTION:-14}
BACKUP_MIN_AGE_DAYS: ${BACKUP_MIN_AGE_DAYS:-0}
ACKNOWLEDGED_MISSING_REPOSITORIES: ${ACKNOWLEDGED_MISSING_REPOSITORIES:-}
BACKUP_TIMEOUT_HOURS: ${BACKUP_TIMEOUT_HOURS:-12}
UPTIME_KUMA_PUSH_URL: ${UPTIME_KUMA_PUSH_URL:-}
UPTIME_KUMA_ALLOW_HTTP: ${UPTIME_KUMA_ALLOW_HTTP:-false}
UPTIME_KUMA_TIMEOUT_SECONDS: ${UPTIME_KUMA_TIMEOUT_SECONDS:-5}
UPTIME_KUMA_MAX_SUCCESS_AGE_HOURS: ${UPTIME_KUMA_MAX_SUCCESS_AGE_HOURS:-0}
BACKUP_WORKERS: ${BACKUP_WORKERS:-1}
healthcheck:
test: ["CMD", "python", "-m", "github_backup.scheduler", "health"]
interval: 60s
timeout: 10s
retries: 3
start_period: 60s
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
github-config:
platform: linux/amd64
build:
context: .
platforms: [linux/amd64]
entrypoint: ["gunicorn"]
command: ["--bind", "0.0.0.0:8080", "--workers", "1", "--threads", "2",
"--timeout", "120", "--graceful-timeout", "20",
"--worker-tmp-dir", "/tmp", "github_backup.config_web:application"]
restart: unless-stopped
init: true
read_only: true
cap_drop: [ALL]
security_opt: [no-new-privileges:true]
pids_limit: 32
cpus: "0.25"
mem_limit: 128m
tmpfs:
- /tmp:rw,noexec,nosuid,size=16m,mode=1777
volumes:
- backup-cache:/cache
expose: ["8080"]
environment:
GITHUB_CONFIG_URL: ${GITHUB_CONFIG_URL:-${GITHUB_SETUP_URL:-}}
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8080/health', timeout=5)"]
interval: 60s
timeout: 10s
retries: 3
start_period: 30s
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
volumes:
backup-cache: