Add service discovery script to jobs, extend nginx and host directory support. Update environment variables, configs, and examples.
This commit is contained in:
1 parent
5305687f98
commit
3aecb3a631
6 files changed
+151
-15
No files matched your search
@@ -13,9 +13,10 @@
|
||||
# every run at a fixed interval: "30s", "15m", "1h", "1d"; at least 1s
|
||||
# cron run on a cron schedule in UTC: "0 4 * * *"
|
||||
# on events: "start", "content-change" (builtin jobs only) and "watch"
|
||||
# watch paths relative to /srv on the host; needs on = ["watch"]. A
|
||||
# directory is watched with everything inside it. The job runs
|
||||
# once things have been quiet for 2s.
|
||||
# watch paths relative to HOST_DIR, like "srv/gitea/compose.yml" or
|
||||
# "nginx/sites-enabled"; needs on = ["watch"]. A directory is
|
||||
# watched with everything inside it. The job runs once things
|
||||
# have been quiet for 2s.
|
||||
# then jobs to trigger after a successful run, builtin ones included
|
||||
# timeout run time after which the job is cancelled; default "5m"
|
||||
# env table of extra environment variables
|
||||
@@ -27,7 +28,8 @@
|
||||
# git and jq available, and get these variables:
|
||||
# JOB_ID the id of the job
|
||||
# CONTENT_DIR the content directory, writable
|
||||
# HOST_DIR /srv of the host, read only
|
||||
# HOST_DIR /host, with /srv of the host in srv/ and its nginx config
|
||||
# in nginx/, both read only
|
||||
#
|
||||
# Cancelling sends SIGTERM to the script and everything it started, then
|
||||
# SIGKILL after 5s. Processes a script leaves behind are killed when it exits.
|
||||
@@ -37,14 +39,18 @@
|
||||
# docker exec security-command-jobs-1 jobctl run services
|
||||
# docker exec security-command-jobs-1 jobctl cancel services
|
||||
|
||||
# Describes the services next to this one in services/, whenever one of their
|
||||
# compose files changes, and rebuilds the static site right away.
|
||||
# Writes links/ and services/ from the nginx config and the directories in
|
||||
# /srv. Copy deploy/jobs/services.sh to jobs/ for it. It runs when the nginx
|
||||
# config changes and every hour for new services, and rebuilds the static
|
||||
# site right away. EXCLUDE lists /srv directories to leave out.
|
||||
[[job]]
|
||||
id = "services"
|
||||
path = "services.sh"
|
||||
every = "1h"
|
||||
on = ["start", "watch"]
|
||||
watch = ["gitea/compose.yml", "nextcloud/compose.yml"]
|
||||
watch = ["nginx"]
|
||||
then = ["index"]
|
||||
env = { EXCLUDE = "lost+found" }
|
||||
|
||||
# Mirrors a public repository into the content once a night.
|
||||
[[job]]
|
||||
|
||||
Reference in new issue
Block a user