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

osama_abdullah's avatar

How to deploy two laravel applications with docker?

When you deploy the laravel application using docker in production you need at least two containers Nginx, PHP and the source code should be in both containers, if you deploy another laravel application on the same (port, server) you have to put the source code of the second application in the Nginx container too which makes both applications depend on each other and cause problems for CI/CD.

Is there a way to deploy both applications independently using docker on the same (port, server) but on different domains?

0 likes
2 replies
Cruorzy's avatar

Sure! But afaik most people use a reverse proxy then. Would advice to do some research on it but in a quick summary

Reverse proxy accepts all port 80 and 443 requests. It makes sense what server it want to go to on basis of Domain

Then forwards the request to that specific nginx container

1 like
osama_abdullah's avatar

@Cruorzy You are totally right but i was afraid that would make performance issues in production or I'm wrong?

Please or to participate in this conversation.