diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 8dce16f..9380ae9 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -17,10 +17,10 @@ "onecentlin.laravel-blade" ] } - } + }, // Use 'postCreateCommand' to run commands after the container is created. - // "postCreateCommand": "sudo chmod a+x \"$(pwd)\" && sudo rm -rf /var/www/html && sudo ln -s \"$(pwd)\" /var/www/html" + "postCreateCommand": ".devcontainer/postCreate.sh" // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. // "remoteUser": "root" diff --git a/.devcontainer/postCreate.sh b/.devcontainer/postCreate.sh new file mode 100755 index 0000000..72e4837 --- /dev/null +++ b/.devcontainer/postCreate.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +# Install dependencies using Composer in case they are missing +if [ ! -f composer.lock ]; then + composer install +fi \ No newline at end of file