clean up and final touches

This commit is contained in:
fccview
2025-08-18 21:04:08 +01:00
parent c813aa2265
commit ec1763070a
5 changed files with 10 additions and 47 deletions

View File

@@ -3,15 +3,13 @@ services:
image: ghcr.io/fccview/cronmaster:main
container_name: cronmaster
user: "root"
network_mode: host
pid: "host"
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
- NEXT_PUBLIC_CLOCK_UPDATE_INTERVAL=30000
# Feel free to change port, as we're running this as host you won't be able to externally map it
- PORT=40123
# Enter the FULL absolute path to the project directory where this docker-compose.yml file is located (use `pwd` to find it)
- NEXT_PUBLIC_HOST_PROJECT_DIR=/path/to/cronmaster/directory
volumes:
# Mount the host's crontab for Linux/Unix systems
@@ -29,9 +27,4 @@ services:
# Mount snippets directory for user-defined snippets
- ./snippets:/app/snippets
restart: unless-stopped
security_opt:
- no-new-privileges:true
cap_add:
- SYS_ADMIN
- SYS_PTRACE
init: true
init: true

View File

@@ -1,17 +0,0 @@
# @id: backup-with-rsync
# @title: Backup with rsync
# @description: Creates a backup using rsync
#!/bin/bash
# Backup source directory to destination
# Change SOURCE_DIR and DEST_DIR to your paths
SOURCE_DIR="/path/to/source"
DEST_DIR="/path/to/backuppp"
rsync -av --progress --delete \
--exclude='*.tmp' \
--exclude='*.log' \
--exclude='node_modules' \
"$SOURCE_DIR/" "$DEST_DIR/"
echo "Backup completed at $(date)"

View File

@@ -1,12 +0,0 @@
# @id: clear-backups
# @title: Clear backups
# @description: Clears old backups after a successful job
#!/bin/bash
# Clean old backups
# Remove backup files older than 30 days
BACKUP_DIR="/backup"
find "$BACKUP_DIR" -name "*.sql" -type f -mtime +30 -delete
find "$BACKUP_DIR" -name "*.tar.gz" -type f -mtime +30 -delete
find "$BACKUP_DIR" -name "backup_*" -type f -mtime +30 -delete

6
scripts/demo-script.sh Executable file
View File

@@ -0,0 +1,6 @@
# @id: demo-script
# @title: Hi, this is a demo script
# @description: This script logs a "hello world" to teach you how scripts work.
#!/bin/bash
echo 'Hello World' > hello.txt

View File

@@ -1,7 +0,0 @@
# @id: test
# @title: Logs Hello World
# @description: This script logs a "hello world" to test the cronjob functionality
#!/bin/bash
# Your script here
echo 'Hello World' > hello.txt