mirror of
https://github.com/fccview/cronmaster.git
synced 2025-12-23 22:18:20 -05:00
37 lines
1.4 KiB
YAML
37 lines
1.4 KiB
YAML
services:
|
|
cronjob-manager:
|
|
image: ghcr.io/fccview/cronmaster:main
|
|
container_name: cronmaster-test
|
|
user: "root"
|
|
ports:
|
|
# Feel free to change port, 3000 is very common so I like to map it to something else
|
|
- "40124:3000"
|
|
environment:
|
|
- NODE_ENV=production
|
|
- DOCKER=true
|
|
- NEXT_PUBLIC_CLOCK_UPDATE_INTERVAL=30000
|
|
- NEXT_PUBLIC_HOST_PROJECT_DIR=/path/to/cronmaster/directory
|
|
# If docker struggles to find your crontab user, update this variable with it.
|
|
# Obviously replace fccview with your user - find it with: ls -asl /var/spool/cron/crontabs/
|
|
# - HOST_CRONTAB_USER=fccview
|
|
volumes:
|
|
# Mount Docker socket to execute commands on host
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
|
|
# 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 foler (thanks to the NEXT_PUBLIC_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
|