coolify/scripts/run

57 lines
1.4 KiB
Plaintext
Raw Normal View History

#!/usr/bin/env bash
# Inspired on https://github.com/adriancooney/Taskfile
2023-04-04 15:30:45 +02:00
#
# Install an alias, to be able to simply execute `run`
2023-04-24 13:25:02 +02:00
# echo 'alias run=./scripts/run' >> ~/.aliases
#
2023-04-04 15:30:45 +02:00
# Define Docker Compose command prefix...
set -e
2023-04-24 13:25:02 +02:00
docker compose &>/dev/null
2023-04-04 15:30:45 +02:00
if [ $? == 0 ]; then
DOCKER_COMPOSE="docker compose"
else
DOCKER_COMPOSE="docker-compose"
fi
function help {
echo "$0 <task> <args>"
echo "Tasks:"
compgen -A function | cat -n
}
2023-04-28 15:22:36 +02:00
function sync-bunny {
bash vendor/bin/spin exec -u webuser coolify php artisan sync:bunny --env=secret ||
php artisan sync:bunny --env=secrets
}
2023-04-24 13:25:02 +02:00
function queue {
bash vendor/bin/spin exec -u webuser coolify php artisan queue:listen
}
2023-04-28 09:00:47 +02:00
function schedule {
bash vendor/bin/spin exec -u webuser coolify php artisan schedule:work
}
function schedule-run {
bash vendor/bin/spin exec -u webuser coolify php artisan schedule:run
}
2023-04-24 13:25:02 +02:00
function reset-db {
bash vendor/bin/spin exec -u webuser coolify php artisan migrate:fresh --seed
}
2023-04-24 13:49:29 +02:00
function coolify {
2023-04-24 13:25:02 +02:00
bash vendor/bin/spin exec -u webuser coolify bash
}
function coolify-root {
bash vendor/bin/spin exec coolify bash
}
function vite {
bash vendor/bin/spin exec vite bash
}
2023-05-02 19:15:17 +02:00
function build-builder {
act -W .github/workflows/coolify-builder.yml --secret-file .env.secrets
}
function default {
help
}
TIMEFORMAT="Task completed in %3lR"
time "${@:-default}"