support for node
This commit is contained in:
parent
811c6d45b4
commit
b9b534b63c
17
helper
17
helper
@ -2,11 +2,7 @@
|
||||
|
||||
# Function to handle PHP Artisan commands
|
||||
php() {
|
||||
if [[ "$1" == "artisan" ]]; then
|
||||
docker compose exec fpm php artisan "${@:2}"
|
||||
else
|
||||
echo "Unknown php command"
|
||||
fi
|
||||
docker compose exec fpm "${@}"
|
||||
}
|
||||
|
||||
# Function to handle Composer commands
|
||||
@ -28,6 +24,11 @@ fix_storage() {
|
||||
docker compose exec fpm chmod -R ug+x bootstrap/cache
|
||||
}
|
||||
|
||||
# Function to handle NPM commands
|
||||
npm() {
|
||||
docker compose exec node npm "${@}"
|
||||
}
|
||||
|
||||
# Function to initialize the composer.yml file
|
||||
init() {
|
||||
cat <<EOL > composer.yml
|
||||
@ -61,6 +62,12 @@ services:
|
||||
- MYSQL_DATABASE=cusport
|
||||
volumes:
|
||||
- ./.db:/var/lib/mysql
|
||||
node:
|
||||
hostname: node
|
||||
image: node:lts
|
||||
volumes:
|
||||
- ./:/var/www/html/
|
||||
working_dir: /var/www/html
|
||||
EOL
|
||||
echo "composer.yml file created successfully!"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user