This program is built for validating scores from image input or zip file.
Variables:
- access: User access level
1: Student2: Teacher3: Administrator4: Developer5: Administrator and developer (Superadmin)
- email: Your email address
- name: Your name
- role: Your role (e.g., Website Developer)
- welcome_message (optional): Custom welcome message
- If left empty, a default message defined in 'data/settings.toml' will be used.
How to use:
- Add a new developer by appending a new line with the format:
access,email,name,role,welcome_message
⚠️ If any field contains whitespace, enclose the value in double quotes. For example:2,dev@example.com,"Jane Doe","Lead Developer","Welcome, Jane!"
- Ensure the email is unique to avoid conflicts.
- The
welcome_messagecan be customized for each developer. - The CSV file will be read by the application to display developer information.
This file will be used for application-wide settings.
Example:
[app]
default_welcome = "Welcome Back Developer! {name} ({role})\nYou are logged in as: {email}"
# Add more configuration variables as needed- Edit
config.tomlto customize default messages and other settings.
For more details, see the code or contact the project maintainer.
A small deployment helper script you can install on a host to build and bring up the project using the current working directory as the project directory.
Recommended deploy-app script:
#!/bin/bash
# deploy-app
# Uses current working directory as project directory
set -euo pipefail
PROJECT_DIR="$(pwd)"
COMPOSE_CMD="docker compose"
LOG_FILE="/var/log/deploy-app.log"
DATE=$(date '+%Y-%m-%d %H:%M:%S')
log() {
echo "[$DATE] $1" | tee -a "$LOG_FILE"
}
log "Using project directory: $PROJECT_DIR"
ls -l "$PROJECT_DIR/Dockerfile"
main() {
log "🚀 Starting deployment in $PROJECT_DIR..."
if [[ ! -f "$PROJECT_DIR/docker-compose.yml" ]]; then
log "❌ docker-compose.yml not found in $PROJECT_DIR"
exit 1
fi
if [[ ! -f "$PROJECT_DIR/Dockerfile" ]]; then
log "❌ Dockerfile not found in $PROJECT_DIR"
exit 1
fi
log "📦 Pulling and rebuilding Docker images (if necessary)..."
$COMPOSE_CMD pull || true
$COMPOSE_CMD build
log "📡 Bringing up the application..."
$COMPOSE_CMD up -d
log "✅ Deployment completed successfully"
}
main "$@"Installation and usage notes
- Save the script as
/usr/local/bin/deploy-appand make it executable:
sudo install -m 0755 deploy-app /usr/local/bin/deploy-app- Then run it from your project directory:
cd /path/to/project
sudo deploy-appAllowing deploy-app via sudo (optional)
- If you'd like non-root users to invoke
deploy-appwithsudowithout a password prompt, add a limited sudoers rule usingvisudo. Example (very selective):
# Allow user `deployuser` to run only /usr/local/bin/deploy-app without a password
deployuser ALL=(root) NOPASSWD: /usr/local/bin/deploy-app
Edit with sudo visudo and place the rule in the file or in a new file under /etc/sudoers.d/deploy-app.
Security notes
- Be careful granting passwordless sudo; restrict the allowed command path to the exact script and keep the script secure (root-owned, not writable by others).
- Consider additional safeguards such as checking
$PROJECT_DIRagainst an allowlist inside the script, or requiring invocation from a specific directory.
This repository includes a small host-side helper script scripts/prune_images.sh that
removes older local Docker image tags for the repository while keeping the newest N tags
(default: 2). It's intended to be run on the host where images are stored to reclaim space
but is conservative by default (dry-run) and skips images currently used by running
containers.
Why use it
- Keeps your host tidy by removing older images that are no longer needed for rollbacks.
- Defaults to a safe dry-run; you must explicitly opt-in to destructive deletion.
Basic usage (dry-run, keep 2 newest):
bash scripts/prune_images.sh --repo ghcr.io/zipherfox/FonDeDeNaJaDelete older images (keep 2 newest):
bash scripts/prune_images.sh --repo ghcr.io/zipherfox/FonDeDeNaJa --no-dry-runKeep 3 newest and delete older:
bash scripts/prune_images.sh --repo ghcr.io/zipherfox/FonDeDeNaJa --keep 3 --no-dry-runNotes and safety
- The script defaults the
--repotoghcr.io/zipherfox/FonDeDeNaJafor this project, so you can run it with no arguments on a host configured for this repo. - It will not remove images that are in use by running containers.
- Deleting tags from the local Docker engine does not affect remote registries.
Integration with deploy-app
- The included
deploy-appscript will offer to run the prune script interactively after a successful deploy when executed from a TTY. The prompt is conservative and runs the prune script in dry-run mode unless you explicitly choose to perform deletion.
Scheduling
- If you want automated pruning on a host, add a cron entry or systemd timer to run the script periodically. See
scripts/prune_images.shanddocs/prune_images.mdfor details.
"Made by Zipherfox, NessShadow, Film"