@@ -13,9 +13,9 @@
"forwardPorts": [],
- "initializeCommand": "php artisan migrate --force && php artisan db:seed",
- "postStartCommand": "git config --global --add safe.directory /var/www/html && npm install && composer install && npm run build && apachectl start",
+
+ "postStartCommand": "git config --global --add safe.directory /var/www/html && npm install && composer install && ./.devcontainer/first-start.sh && npm run build && apachectl start",
// Configure tool-specific properties.
"customizations" : {
@@ -0,0 +1,6 @@
+if [ ! -f ./.devcontainer/first-start.flag ]; then
+ echo "Running first-start commands..."
+ # Add your one-time commands here
+ php artisan migrate --force && php artisan db:seed
+ touch ./.devcontainer/first-start.flag
+fi
@@ -10,6 +10,7 @@
.env.production
.phpactor.json
.phpunit.result.cache
+.devcontainer/first-start.flag
Homestead.json
Homestead.yaml
npm-debug.log