forgejo-conf-files/Justfile
2024-03-21 00:33:23 +03:00

35 lines
813 B
Makefile

@_default:
{{just_executable()}} -f {{justfile()}} --list
# Run the instance [aliases: r]
@run:
sudo docker-compose up -d
# Stop the instance [aliases: s]
@stop:
sudo docker-compose rm -f -s
# Pull the new patch Forgejo version [aliases: u]
@update_patch: stop && run
sudo docker rmi -f $(sudo docker images -q -f reference=codeberg.org/forgejo/forgejo)
# Restart the instance
@restart: stop run
# Create Backup file [aliases: b]
@backup backup_name: stop && run
#!/usr/bin/env bash
FILES="forgejo forgejo-runner Justfile docker-compose.yml README.md"
7z a -t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -mhe=on -p {{backup_name}}.7z $FILES
echo "Backup done..."
[private]
alias r := run
[private]
alias s := stop
[private]
alias u := update_patch
[private]
alias b := backup