first-start.sh 947 B

1234567891011121314151617181920
  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. chown -R root:www-data /var/www/html
  6. chmod -R 775 /var/www/html/storage /var/www/html/bootstrap/cache && \
  7. find /var/www/html -type f -exec chmod 775 {} \; && \
  8. find /var/www/html -type d -exec chmod 775 {} \; && \
  9. chmod -R 775 /var/www/html/storage/logs /var/www/html/storage/framework && \
  10. npm install && \
  11. composer install && \
  12. php artisan migrate --force && \
  13. php artisan db:seed && \
  14. chown -R root:www-data /var/www/html
  15. chmod -R 775 /var/www/html/storage /var/www/html/bootstrap/cache && \
  16. find /var/www/html -type f -exec chmod 775 {} \; && \
  17. find /var/www/html -type d -exec chmod 775 {} \; && \
  18. chmod -R 775 /var/www/html/storage/logs /var/www/html/storage/framework && \
  19. touch ./.devcontainer/first-start.flag
  20. fi