Add jobs service with script execution, configuration support, and control interface.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1f6d41ab06
commit
0ad5b5f44f
27 files changed
+1108
-45
No files matched your search
@@ -47,6 +47,7 @@ services:
|
||||
STATUS_DIR: /run/status
|
||||
CONTENT_DIR: /content
|
||||
JOBS_FILE: /config/jobs.toml
|
||||
TRIGGER_DIR: /run/jobs/triggers
|
||||
SITE_URL: ${SITE_URL:-https://security-command.org}
|
||||
LEGAL_PAGES: ${LEGAL_PAGES:-impressum:impressum.txt,datenschutz:datenschutz.txt}
|
||||
ALLOWED_ORIGINS: ${ALLOWED_ORIGINS:-https://security-command.org}
|
||||
@@ -58,6 +59,39 @@ services:
|
||||
- ./runtime/status:/run/status
|
||||
- ${CONTENT_DIR}:/content:ro
|
||||
- ./config:/config:ro
|
||||
- ./runtime/jobs/triggers:/run/jobs/triggers:ro
|
||||
logging:
|
||||
driver: json-file
|
||||
options:
|
||||
max-size: 10m
|
||||
max-file: "3"
|
||||
|
||||
jobs:
|
||||
image: ${JOBS_IMAGE:?run deploy.sh}
|
||||
restart: unless-stopped
|
||||
# Jobs run as the owner of the content directory, so they can write into it.
|
||||
user: "${JOBS_USER:?run deploy.sh}"
|
||||
init: true
|
||||
read_only: true
|
||||
tmpfs:
|
||||
- /tmp:size=64m
|
||||
cap_drop: [ALL]
|
||||
security_opt: [no-new-privileges:true]
|
||||
mem_limit: 256m
|
||||
pids_limit: 128
|
||||
environment:
|
||||
JOBS_FILE: /config/jobs.toml
|
||||
SCRIPTS_DIR: /jobs
|
||||
CONTENT_DIR: /content
|
||||
HOST_DIR: /host/srv
|
||||
TRIGGER_DIR: /run/jobs/triggers
|
||||
CONTROL_SOCKET: /run/jobs/control.sock
|
||||
volumes:
|
||||
- ${CONTENT_DIR}:/content
|
||||
- ./config:/config
|
||||
- ./jobs:/jobs:ro
|
||||
- ${JOBS_HOST_DIR:-/srv}:/host/srv:ro
|
||||
- ./runtime/jobs:/run/jobs
|
||||
logging:
|
||||
driver: json-file
|
||||
options:
|
||||
|
||||
Reference in new issue
Block a user