Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

mateoo88's avatar

One laravel application on multiple servers

I am using my Laravel application on three servers. The same application runs on each of the three servers, but there are differences, such as logos used in Blade templates and .env settings. I am wondering what the best way is to handle the situation when I update the code in the application or add a new feature, and then pull it through GIT on each server to update the application code without changing the specific settings unique to each server. How do you handle this type of "problem"?

0 likes
3 replies
Snapey's avatar

I have the same scenario, and have a settings table where things like application logo paths are defined. The master branch also contains all the images for the installs. Any behavior differences or enabled/disabled features are also indicated in the settings table.

In my case each install is for a different customer and I do have branches for each. The workflow is to maintain a master branch and develop on a customer branch, and then pull to master when Im sure there are no side effects affecting other clients. Each server pulls from that clients branch. I find customers are far more forgiving when the service goes down because you are working on their change requests than if it goes down because you deployed someone elses change.

1 like
mateoo88's avatar

@Snapey If I may ask, why did you choose the database to store logo paths instead of, for example, the .env file?

Snapey's avatar

@mateoo88 you could do that also, but I have about 100 settings, plus they get backed up with my DB backups. I still use env for secrets

1 like

Please or to participate in this conversation.