ttreasure преди 7 месеца
родител
ревизия
c7cb071fe8
променени са 2 файла, в които са добавени 3 реда и са изтрити 5 реда
  1. 1 2
      .devcontainer/devcontainer.json
  2. 2 3
      .devcontainer/first-start.sh

+ 1 - 2
.devcontainer/devcontainer.json

@@ -15,8 +15,7 @@
 
 
 
-    "postStartCommand": "git config --global --add safe.directory /var/www/html && npm install && composer install && ./.devcontainer/first-start.sh && npm run build && apachectl start",
-
+    "postStartCommand": "chmod o+x ./.devcontainer/first-start.sh && ./.devcontainer/first-start.sh && git config --global --add safe.directory /var/www/html && npm install && composer install && npm run build && apachectl start",
 	// Configure tool-specific properties.
   "customizations" : {
     "jetbrains" : {

+ 2 - 3
.devcontainer/first-start.sh

@@ -1,13 +1,12 @@
 if [ ! -f ./.devcontainer/first-start.flag ]; then
     echo "Running first-start commands..."
     # Add your one-time commands here
+    cd /var/www/html
     chown -R www-data:www-data /var/www/html && \
     chmod -R 775 /var/www/html/storage /var/www/html/bootstrap/cache && \
     find /var/www/html -type f -exec chmod 644 {} \; && \
     find /var/www/html -type d -exec chmod 755 {} \; && \
     chmod -R 775 /var/www/html/storage/logs /var/www/html/storage/framework
-    cd ..
     php artisan migrate --force && php artisan db:seed
-    cd .devcontainer
-    touch first-start.flag
+    touch ./.devcontainer/first-start.flag
 fi