forgejo-conf-files/Justfile
Awiteb 3685647138
chore: Rename the update task to update
Signed-off-by: Awiteb <a@4rs.nl>
2024-05-23 15:22:32 +03:00

35 lines
806 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 and minor of Forgejo [aliases: u]
@update: 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
[private]
alias b := backup