Cloned Laravel Repo on Digital Ocean Droplets
Hi, Digital Ocean's team suggested I asked this community for help with their Droplet Marketplace Image of Laravel.
Is there a guide on replacing the Laravel App inside the Laravel Image with my own Git Repo? I know there are guides on how to create a Laravel App using Droplet from scratch, but I rather be able to just replace the folder inside the /var/www/laravel.
I made sure my folders had the same permission and owner as the default laravel folder, made sure that the site is enabled in the nginx folders, and restarted nginx as well.
Any help is appreciated.
Hi there,
Welcome to the DevDojo community!
Yes absolutely, you can just delete the contents of the laravel folder and then deploy your own project there.
Then as normal, run composer install
update your database details in your .env
file and run your database migrations.
Then to sort out the permissions run the following commands:
sudo chown -R larasail:www-data ${rootPath}/storage
sudo chown -R larasail:www-data ${rootPath}/bootstrap/cache
That way the Nginx service will have access to write to the storage and cache directories.
Hope that this helps.
Best,
Bobby