Files
cronmaster/docker-compose.yml
2025-08-18 13:15:13 +01:00

36 lines
1.3 KiB
YAML

services:
cronjob-manager:
build: .
ports:
- "3000:3000"
environment:
- NODE_ENV=production
- NEXT_PUBLIC_CLOCK_UPDATE_INTERVAL=30000
# Enter the FULL relative path to the project directory where this docker-compose.yml file is located (use `pwd` to find it)
- NEXT_PUBLIC_HOST_PROJECT_DIR=/absolute/path/to/project/directory
volumes:
# Mount the host's crontab for Linux/Unix systems
- /var/spool/cron/crontabs:/var/spool/cron/crontabs:ro
- /etc/crontab:/etc/crontab:ro
# Mount system information directories
- /proc:/proc:ro
- /sys:/sys:ro
- /etc:/etc:ro
# Mount scripts directory for script execution
- ${NEXT_PUBLIC_HOST_PROJECT_DIR}/scripts:/app/scripts
# Mount data directory for persistence
- ${NEXT_PUBLIC_HOST_PROJECT_DIR}/data:/app/data
# Mount snippets directory for user-defined snippets
- ${NEXT_PUBLIC_HOST_PROJECT_DIR}/snippets:/app/snippets
# Run with host network to access system information
network_mode: host
# Run as root to access system commands (needed for cron operations)
user: root
restart: unless-stopped
security_opt:
- no-new-privileges:true
cap_add:
- SYS_ADMIN
cap_drop:
- ALL