mirror of
https://github.com/fccview/cronmaster.git
synced 2025-12-23 22:18:20 -05:00
clean up and final touches
This commit is contained in:
@@ -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
|
||||
@@ -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)"
|
||||
@@ -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
6
scripts/demo-script.sh
Executable 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
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user