I'm confused about how to deploy my Laravel app. I'm already paying for a host (One.com) and I'd rather not sign up for Vapor, Forge, AWS, DigitalOcean, Heroku, Netlify or any other additional service.
Previous to Laravel 8 I deployed using this method from Traversy Media and just dragged & dropped into folders with FTP, but from Laravels documentation I get the impression that this is not a recommended way of doing it.
What's the absolute simplest, free way to deploy my Laravel application?
What's the absolute simplest, free way to deploy my Laravel application?
Laravel Forge is by far the simplest way to deploy Laravel apps.
There are so many topics here on the forum about running Laravel on shared hosting so you can search and find the technique that suites your needs best.
There are many issues that need to be resolved by going with shared hosting so be ready to do a lot's of googling and patching. And who knows if it will work when you upgrade your app to newer version of Laravel or some package that you need.
Unfortunately, Forge is not free. It feels a bit unnecessary to pay for an additional service when I'm already paying for a domain and hosting. That said, I might consider it if its a lot of work to deploy to shared hosting.
@thecelebratedmrk even that hosting is not free so we can't expect Forge to be free. If I was in your places I would stop paying for hosting, just purchase domain and rent a VPS. For a bit more money (few dollars per year) you get SSH which is priceless.
Considering the time and effort to do all of what forge is doing, I would say it’s in fact much cheaper to pay forge then to do it yourself. Time is money...
start server. with digitalocean or similar it easy
generate some webserver config. i use nginxconfig.io, easy to configure nginx at once with https etc
create directory with project and git clone, composer install, php artisan migrate
when it need, run git pull like ssh dev@myproject 'cd /var/www/myproject/master/ && git pull'
in a large project, you can automate 4 points. when master updates, server can generate tests, make artisan migrate etc and then of all make make pull && php artisan migrate. but usually enough git pull
AWS offers free teir for 12 months on EC2 + RDS and many more feature during those months.
I have been using AWS resources for almost 2 years now and still I haven't paid more than $40 bucks in total. You can attend AWS live webinars and by giving feedback you can get $25 credits for free. Those credits will used to pay for the AWS resources you use.
Having said, it does take a bit more time to setup your instances and their documentations are not quite good. Still a good choice for me though in terms of budgeting.