DEV Community

StuartCreed
StuartCreed

Posted on • Updated on

The best way to deploy A Lavarel App

Laravel Vapor -> the best but most expensive way.

Laravel Forge

Beanstalk - similar to Heroku - it build is based on the zip file you upload.
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/php-laravel-tutorial.html - automatically scales the application - basically perfect for small businesses. Warns you when the load is too high. But you just pay for the EC2 instance so it is slightly cheaper than Heroku - you also receive cloud alerts and warnings. With a bit of configuration you can also link it with github.

Heroku approach - £7-50 a month - more expensive but you can link it to your git commit. Heroku has free PostGres support but you will have to pay $10 a month extra to gain an add-on so that you can use mysql
https://devcenter.heroku.com/articles/getting-started-with-laravel
https://mattstauffer.com/blog/installing-a-laravel-app-on-heroku/
https://mattstauffer.com/blog/laravel-on-heroku-using-a-mysql-database/

Create your own EC2 instance:
https://dzone.com/articles/how-to-deploy-laravel-application-on-aws-ec2-the-r
You can then add other stuff later like monitoring.
Other links:
Medium article - https://link.medium.com/0plPDTB7Lbb
I think this is the best choice but it requires more configuration. To allow for easy deployment https://www.deployhq.com/guides/amazon-ec2
Ensure that you use a ubuntu instance rather than an AMI

Top comments (0)