move postCreateCommands to a separate file

This commit is contained in:
Joe Skeen 2023-12-08 15:34:00 +00:00
parent f8c2f58604
commit 7a5036d957
2 changed files with 6 additions and 5 deletions

View File

@ -40,11 +40,7 @@
"forwardPorts": [ "forwardPorts": [
8080 8080
], ],
"postCreateCommand": [ "postCreateCommand": ".devcontainer/postCreateCommand.sh",
"composer install --no-dev --optimize-autoloader",
"sudo chmod a+x \"$(pwd)\" && sudo rm -rf /var/www/html && sudo ln -s \"$(pwd)\" /var/www/html",
"npm install --global nyc"
],
// alternatiuve: apache2ctl start (but requires root) // alternatiuve: apache2ctl start (but requires root)
"postAttachCommand": "php -S 0.0.0.0:8080" "postAttachCommand": "php -S 0.0.0.0:8080"
} }

View File

@ -0,0 +1,5 @@
#!/bin/bash
composer install --no-dev --optimize-autoloader
sudo chmod a+x "$(pwd)" && sudo rm -rf /var/www/html && sudo ln -s "$(pwd)" /var/www/html
npm install --global nyc