Merge pull request #1210 from joeskeen/devcontainer-postcreate

move postCreateCommands to a separate file
This commit is contained in:
El RIDO 2023-12-09 12:16:21 +01:00 committed by GitHub
commit 46d8d7d781
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 5 deletions

View File

@ -40,11 +40,7 @@
"forwardPorts": [
8080
],
"postCreateCommand": [
"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"
],
"postCreateCommand": ".devcontainer/postCreateCommand.sh",
// alternatiuve: apache2ctl start (but requires root)
"postAttachCommand": "php -S 0.0.0.0:8080"
}

View File

@ -0,0 +1,5 @@
#!/bin/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