first-start.sh 910 B

12345678910111213141516171819
  1. if [ ! -f ./.devcontainer/first-start.flag ]; then
  2. echo "Running first-start commands..." && \
  3. # Add your one-time commands here
  4. cd /var/www/html && \
  5. chmod -R 775 /var/www/html/storage /var/www/html/bootstrap/cache && \
  6. find /var/www/html -type f -exec chmod 644 {} \; && \
  7. find /var/www/html -type d -exec chmod 755 {} \; && \
  8. chmod -R 775 /var/www/html/storage/logs /var/www/html/storage/framework && \
  9. npm install && \
  10. composer install && \
  11. php artisan migrate --force && \
  12. php artisan db:seed && \
  13. chown -R www-data:www-data /var/www/html
  14. chmod -R 775 /var/www/html/storage /var/www/html/bootstrap/cache && \
  15. find /var/www/html -type f -exec chmod 644 {} \; && \
  16. find /var/www/html -type d -exec chmod 755 {} \; && \
  17. chmod -R 775 /var/www/html/storage/logs /var/www/html/storage/framework && \
  18. touch ./.devcontainer/first-start.flag
  19. fi