bor1904's avatar

CI/CD laravel app - best proctices

Hello Guys, I have some doubts about deployment your laravel apps. I start reading about that and there are many ways to do this ... like GITLab pipelines, Jenkins, Docker (kubernetes), Ansible (ansistrano), Bash scripts and probably much more...

Do you have automated deployment of your apps? maybe it depends? But if yes how does it look like ? which tools? what does the flow look like?

I am very curious what best practices look like in reality :)

Thank you for your feedback

0 likes
1 reply
PaulMaxOS's avatar

I'm using a combination of GitHub Actions and Forge and Envoyer:

When opening a new PR a GitHub action will run the tests on each commit to the branch of the PR. When tests are green there's another step that merges the branch of the PR into a staging branch. On my Forge server I enabled quick deploy for this staging branch, so whenever I open a PR or commit to it, my tests run and when they're successful the code gets shipped to my staging env.

Now when I merge the PR into main, Envoyer will pickup and do the rollout to my production env with zero downtime. It's of course a matter of taste if you want to deploy directly when something got merged into main, but until now this approach took quite far down the road :)

1 like

Please or to participate in this conversation.