Configure Logstash, Elasticsearch, and Kibana with Docker

It was a long time ago I wanted to write this post and show you how to set up a docker-compose with all you need to have a separate logging system. Logging is a meaningful way to monitor your application’s behavior. When it comes to production and having multiple servers running one application in different instances, You might want to have a unified logging system to check them all in one place....

July 22, 2023 · Saeed Vaziry

Automated pipeline tests, version bumping and deployments with Gitlab

This is one of my favorite topics! Setting up a fully automated deployment. I want to share with you how to set up a fully automated deployment including tests and version bumping. I am using PHP and Laravel as the sample project but please keep in mind that this post is not limited to Laravel and PHP only! If you don’t want to read the post and jump to the Repo:...

August 19, 2022 · Saeed Vaziry

Run Laravel tests on GitHub Actions

Imagine yourself in a big team coding on a single project. In our scenario the project is Laravel. There would be tens of Pull Requests waiting to merge but you need to make sure that nothing goes wrong after the merge. Obviously, you’ll have tests in your project but it would be very tricky to go through the all PRs and run the tests on your local. GitHub Actions Thanks to GitHub there is a feature called Actions that comes in handy in this case....

April 12, 2022 · Saeed Vaziry

Laravel Custom Helpers, Facades, and Testing Fakes

Let’s consider that we want to create a custom helper named SSH. This helper is going to connect to a remote server via ssh and execute some commands. Commands Since we might have many commands, I would create an interface first. // app/Commands/Command.php namespace App\SSHCommands; use App\Contracts\SSHCommand; interface Command { public function content(); } And then an example command. // app/Commands/DirectoryListCommand.php namespace App\SSHCommands; use App\Contracts\SSHCommand; class DirectoryListCommand implements Command { public function content() { return "ls -la"; } } Helper Alright....

February 18, 2022 · Saeed Vaziry