forked from coollabsio/coolify
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun
executable file
·69 lines (57 loc) · 1.39 KB
/
run
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/usr/bin/env bash
# Inspired on https://github.com/adriancooney/Taskfile
#
# Install an alias, to be able to simply execute `run`
# echo 'alias run=./scripts/run' >> ~/.aliases
#
# Define Docker Compose command prefix...
set -e
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
}
function logs {
docker exec -t coolify tail -f storage/logs/laravel.log
}
function test {
docker exec -t coolify php artisan test --testsuite=Feature
}
function sync:bunny {
php artisan sync:bunny --env=secrets
}
function db:reset {
bash spin exec -u webuser coolify php artisan migrate:fresh --seed
}
function db:reset-prod {
bash spin exec -u webuser coolify php artisan migrate:fresh --force --seed --seeder=ProductionSeeder ||
php artisan migrate:fresh --force --seed --seeder=ProductionSeeder
}
function coolify {
bash spin exec -u webuser coolify bash
}
function coolify:root {
bash spin exec coolify bash
}
function coolify:proxy {
docker exec -ti coolify-proxy sh
}
function redis {
docker exec -ti coolify-redis redis-cli
}
function vite {
bash spin exec vite bash
}
function tinker {
bash spin exec -u webuser coolify php artisan tinker
}
function default {
help
}
TIMEFORMAT="Task completed in %3lR"
time "${@:-default}"