Docker-compose - two Web app and web site on the same server

Hi All,

Could you advise please?

Our contractor has built a Django web application on Docker-compose and it works, we use the mydomain address to open the application.

But now we need to create a website.

The best way to do this is to have the application open at mydomain/app and the website at mydomain.

How can I do it right? I need to create an additional container with a website, but how can I access from the web, using links:
mydomain - website
mydomain/app - application
and in the future mydomain/chat

Thanks!

Good evening,
two slightly different ideas come to my mind:

  1. using NginX as a loadbalancer: website + application + chat are not directly accessible from the outside world. Only the NginX is accessible acting as a reverse proxy. Advantage: a lot of documentation available; Disadvantage: no dynamic re-configuration => container needs to be restarted on every configuration change.
  2. Using Traefik as a loadbalancer: website + application + chat are not directly accessible from the outside world. Only Traefik is accessible acting as loadbalancer. Advantage: dynamic re-configuration; Disadvantage: less documentation available

I have used both versions in the past. So if you need some configration-hints I can provide some snippets…