add small bash/artisan helper commands

This commit is contained in:
Christian Winther 2024-02-21 22:15:41 +00:00
parent abee7d4d62
commit adf1af3703
2 changed files with 18 additions and 0 deletions

6
docker/artisan Executable file
View file

@ -0,0 +1,6 @@
#!/bin/bash
declare service="${PF_SERVICE:=worker}"
declare user="${PF_USER:=www-data}"
exec docker compose exec --user "${user}" "${service}" php artisan "${@}"

12
docker/bash Executable file
View file

@ -0,0 +1,12 @@
#!/bin/bash
declare service="${PF_SERVICE:=worker}"
declare user="${PF_USER:=www-data}"
declare -a command=("bash")
if [[ $# -ge 1 ]]; then
command=("$@")
fi
exec docker compose exec --user "${user}" "${service}" "${command[@]}"