Ways of deploying Laravel App

Ivan Kolodii
2 min readAug 21, 2021

There are many-many variations of how you can deploy your app. Of course, it heavily depends on the type of app: whether it’s a simple one-page website or a high-load SAAS.

I try to follow two main concepts when it comes to deployment:
- it should be as automated as possible
- it must be cost-effective.

I can highlight a few main deployment solutions: Vapor, Forge and DigitalOcean App platform.

Vapor

I’ve already covered deployment serverless applications via Vapor. In general, it’s a really good solution for heavily loaded apps. Also, it can be cost-effective for apps with not-predictable traffic. Using Vapor you won’t be needed to buy super powerful instances. Your app will be scaled horizontally. For sure, Vapor is not very useful for a simple website with predictable traffic and will cost you a minimum of $39(subscription) and at least $50 of AWS cost(if you use the smallest RDS instance). So, in general, nearly $100 can be a bit pricy for a small website.

Forge

This SaaS solution can be a great alternative to Vapor for regular websites. It gives you a lot of automation and full control of your servers at the same time.
It helps you with provisioning everything you need with the Laravel app: database, cache, queue, etc. And it’s a bit cheaper than Vapor, it costs $19/month + DigitalOcean cost(it can be only $5–$10 for the smallest instances)

DigitalOcean Apps

Another good option to deploy your Laravel app. It automatically detects your stack and configures necessary workers. I would prefer using it with simple one page websites or node/python based apps. Pricing starts from $5 + pricing for DB which starts from $15.

All options have their pros and cons. I prefer using Forge with Laravel apps as its main purpose was to work with Laravel apps. It serves everything you need and the pricing is reasonable.

Vapor is great for apps with heavy loads and DigitalOcean App platform is good for NodeJS or simple websites with different stacks.

And finally you are always free to use Docker and Digital Ocean droplets. It will be the cheapest way but the most cumbersome so I wouldn’t recommend you this approach.

--

--