Files
cronmaster/docker-compose.yml
2025-08-31 21:19:51 +01:00

48 lines
1.8 KiB
YAML

services:
cronjob-manager:
image: ghcr.io/fccview/cronmaster:1.4.0
container_name: cronmaster
user: "root"
ports:
# Feel free to change port, 3000 is very common so I like to map it to something else
- "40123:3000"
environment:
- NODE_ENV=production
- DOCKER=true
# --- MAP HOST PROJECT DIRECTORY, THIS IS MANDATORY FOR SCRIPTS TO WORK
- HOST_PROJECT_DIR=/path/to/cronmaster/directory
- NEXT_PUBLIC_CLOCK_UPDATE_INTERVAL=30000
# --- PASSWORD PROTECTION
# Uncomment to enable password protection (replace "password" with your own)
#- AUTH_PASSWORD=password
# --- CRONTAB USERS
# This is used to read the crontabs for the specific user.
# replace fccview with your user - find it with: ls -asl /var/spool/cron/crontabs/
# For multiple users, use comma-separated values: HOST_CRONTAB_USER=fccview,root,user1,user2
# - HOST_CRONTAB_USER=fccview
volumes:
# --- MOUNT DOCKER SOCKET
# Mount Docker socket to execute commands on host
- /var/run/docker.sock:/var/run/docker.sock
# --- MOUNT DATA
# These are needed if you want to keep your data on the host machine and not wihin the docker volume.
# DO NOT change the location of ./scripts as all cronjobs that use custom scripts created via the app
# will target this folder (thanks to the HOST_PROJECT_DIR variable set above)
- ./scripts:/app/scripts
- ./data:/app/data
- ./snippets:/app/snippets
# --- USE HOST PID NAMESPACE FOR HOST COMMAND EXECUTION
# --- RUN IN PRIVILEGED MODE FOR NSENTER ACCESS
pid: "host"
privileged: true
restart: unless-stopped
init: true
# --- DEFAULT PLATFORM IS SET TO AMD64, UNCOMMENT TO USE ARM64.
#platform: linux/arm64