first-start.sh 643 B

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