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