-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathconfig.yaml
More file actions
141 lines (131 loc) · 3.89 KB
/
Copy pathconfig.yaml
File metadata and controls
141 lines (131 loc) · 3.89 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# Defaults to UTC timezone
time_zone: 'UTC'
# Can be one of: "debug, info, warn, error, off", default is info
log_level: 'info'
# Delete runs from db after x days, disable with 0, default is 7
delete_runs_after_days: 7
# SQLite database directory (defaults to the same folder as this config file)
# Can be set to any absolute or relative folder path
db:
location: '.'
# SQLite database filename
name: 'db.sqlite'
# You can choose the following software to be included:
# apprise, borgbackup, docker, git, podman, rclone, rdiff-backup,
# restic, rsync, logrotate, sqlite, kopia
# Refer to internal/software/software.go for the exact way it is installed
# and how to change the version that will be installed here.
# Recreate the docker for changes to take effect
software:
- name: 'git'
# Terminal configuration
terminal:
# When set to true, any command will be allowed,
# and the allowed_commands list will be ignored.
allow_all_commands: false
# Be careful with this, it will allow a command to be executed.
# Do not allow any commands that can compromise the system!
allowed_commands:
cat:
args:
- /config/config.yaml
docker:
args:
- ps
- version
restic:
args:
- version
export:
# Do not check for arguments, allow all arguments
allow_all_args: true
# Server configuration
server:
# Defaults to 0.0.0.0 to be accessible outside docker
address: '0.0.0.0'
# Defaults to 8156
port: 8156
# Healthcheck configuration
healthcheck:
# Use authorization header
authorization: '...'
# Change HTTP method, defaults to POST
type: 'POST'
# Healthcheck phases, start, end, and failure
# each has a url, query params, and body that is sent
start:
url: https://status.example.com
params:
success: true
body: '{"foo": "bar"}'
end:
url: https://status.example.com
params:
success: true
body: '{"foo": "bar"}'
failure:
url: https://status.example.com
params:
success: false
error: 'Backup failed'
body: '{"foo": "bar"}'
# Defines default values that are applied to all jobs
# Here you can define commands that will be executed before and after the job
job_defaults:
cron: '0 3 * * 0'
# Optional: abort any single command after this duration (e.g. '30s', '5m')
# timeout: '30s'
# Optional: retry each failing command up to N times (0 = no retries)
# retries: 2
envs:
- key: SLEEP_TIME
value: '5'
pre_commands:
- echo "Starting backup..."
post_commands:
- echo "Backup finished!"
# Job configuration
# Multiple jobs can be defined
# They will be executed in sequence
jobs:
- name: 'Example Scheduled Happy Path'
# Runs automatically and demonstrates a clean successful job
cron: '0 5 * * 0'
# Stop immediately on first failing command (default behavior)
disable_fail_fast: false
# Commands run in order
commands:
- echo "start"
- date
- echo "done"
- name: 'Example Continue On Failure'
# Runs automatically and continues even after a failing command
cron: '15 5 * * 0'
disable_fail_fast: true
commands:
- echo "before fail"
- false
- echo "continues"
- name: 'Example Env Expansion'
# Demonstrates per-job environment variables and ${VAR} expansion
cron: '30 5 * * 0'
envs:
- key: TEST_VALUE
value: 'default-value'
commands:
- echo "value=${TEST_VALUE}"
- name: 'Example Timeout And Retries'
# Demonstrates per-command timeout and retry behavior
cron: '45 5 * * 0'
# Abort any single command that runs longer than 30s
timeout: '30s'
# Retry each failing command up to 2 times (3 total attempts)
retries: 2
commands:
- echo "timeout and retries configured"
- name: 'Example Manual Long Running'
# Only runs when triggered manually
disable_cron: true
commands:
- sleep 5
- echo "manual done"