Repository navigation
Expand file tree
/
Copy pathq
More file actions
executable file
·48 lines (46 loc) · 1.47 KB
/
Copy pathq
File metadata and controls
executable file
·48 lines (46 loc) · 1.47 KB
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
#! /bin/bash
if [[ "$1" == "test" ]]; then
shift
docker compose run --rm php vendor/bin/pest "$@"
elif [[ "$1" == "migrate" ]]; then
shift
docker compose run --rm artisan migrate "$@"
elif [[ "$1" == "composer" ]]; then
shift
docker compose run --rm composer "$@"
elif [[ "$1" == "php" ]]; then
shift
docker compose run --rm php "$@"
elif [[ "$1" == "artisan" ]]; then
shift
docker compose run --rm artisan "$@"
elif [[ "$1" == "vite" ]]; then
shift
docker compose run --rm vite npm run dev
elif [[ "$1" == "node" ]]; then
shift
docker compose run --rm node "$@"
elif [[ "$1" == "ps" ]]; then
docker ps --format 'table {{.ID}}\t{{.Status}}\t{{.Names}}\t{{.Ports}}'
elif [[ "$1" == "up" ]]; then
shift
docker compose --env-file ./src/.env up "$@"
elif [[ "$1" == "down" ]]; then
docker compose --env-file ./src/.env down --remove-orphans
# Add more elif blocks for other shortcuts
else
echo "Usage: $0 <command>"
echo "Available commands:"
echo "
ps show the docker processes
up start the compose services
down stop the composer services
composer run composer commands
php run commands inside php container
artisan run artisan commands
vite run vite to compile assets
test run application tests and reach out to PEST binary
node run node container and any command on it
migrate run the migrations for the application
"
fi