Development & Server Setup 2019
When I started developping LaravelPackages.net and it's search module, I quickly noticed that Algolia was not going to be enough for this project. There are dozen of hundreds laravel packages out there that I needed to index. I naturally checked Elastic Search and tried it on my local machine for the first time. Worked like a charm!
But using Elastic Search in production is a whole other thing. Installing it on my main server could complicate a lot of things especially as I have several client production website hosted there, I didn't want to take the risk to run those websites + Redis + Elastic Search on the same machine. It would have consumed way too much RAM.
So I started investigating VPS, and Laravel Forge.
After some research and thinking I decided to move some of my web applications from my server and use cheaper third party services to serve my needs.
In other words, here's my complete infrastructure stack that I use to run personnal projects + clients projects.
I own a (pretty big) dedicated server, costing ~100€ per month. I use it for a lot of stuff, including:
This server provided by OVH. I'm pretty happy with it.
As my server is provided by OVH, I also use OVH to buy my domain names.
Every Time I buy a domain I immediately use CloudFlares name servers. CloudFlares is free and gives you incredible benefits like analytics and caching.
Now that Github allows you the have unlimited private repositories, I simply host all of my projects on Github. Simple and perfect and.. free!
For some client project that have high trafic, I use Laravel Forge to setup VPS with Hetzner and Digital Ocean.
I use Mailgun. Easy to setup, has a free plan. Works perfectly!
For projects that have less than 10k records, I simply use Algolia (with Laravel Scout). It's insanely easy to setup and blazing fast! And it has a free plan! I have multiple projects using Algolia free plan in production.
For projects that have more than 10k records, I use a self hosted Elastic Search server on a 12€/month VPS at Hetzner. Still cheaper than Algolia paid plans.
When I push new code on my github repositories, I trigger an automated deployment to update the code on my server. To do that, I ues Gitlab CI.
And guess what, it's free!
On gitlab, you can import Github Repositories and setup deployment pipelines. So pushing your code on github will trigger the gitlab pipeline.
The pipeline will build the project and run the Test Suite. If everything passes, gitlab trigger a Laravel Envoy script to deploy on the server.
I had to setup a "deployer" user on my server. Laravel Envoy will ssh into my server as the "deployer" user, and execute every command lines necessary to update the code, flush the cache, etc.
So again, my Continuous Delivery system costs me... 0€ YAY!
I consider myself as an IT Business Artisan. Or Consultant CTO if you prefer. I'm a self-taught Web Developper, coach and teacher. My main work is helping and guiding digital startups.more about me
2019 My Dynamic Production SPRL All rights Reserved.