Add Justfile
This commit is contained in:
parent
887826291a
commit
20f906035b
1 changed files with 35 additions and 0 deletions
35
Justfile
Normal file
35
Justfile
Normal file
|
@ -0,0 +1,35 @@
|
|||
@_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
|
||||
|
Loading…
Reference in a new issue