<p>Although I agree with @BruceBecker's comment, i.e. running two different rproxies, it is possible to run traefik in front of nginx. At the previous job we configured several servers that were running on nginx behind traefik.</p>

<p>Ensure that each microservice has the correct labels. Note that Traefik 2.0 changed significantly.</p>

CC BY-SA 4.0
2020-10-09T18:25:57.690Z
But to answer the question, _should_ they run it this way?
duct_tape_coder
CC BY-SA 4.0
2020-01-02T22:40:49.727Z
2020-01-02T22:40:49.727Z
030
<p>I have Traefik reverse proxy running to allow a couple of docker containerized apps to run on the same domain just to learn about running multiple containers following <a href="https://www.smarthomebeginner.com/traefik-reverse-proxy-tutorial-for-docker" rel="nofollow noreferrer">https://www.smarthomebeginner.com/traefik-reverse-proxy-tutorial-for-docker</a>. Everything works well.  I want to install Device Hive to test it as an IOT platform, but it has multiple containers and it's own nginx proxy and docker-compose file <a href="https://github.com/devicehive/devicehive-docker/blob/master/rdbms-image/docker-compose.yml" rel="nofollow noreferrer">https://github.com/devicehive/devicehive-docker/blob/master/rdbms-image/docker-compose.yml</a>.</p>

<p>Is there a way I can add the Device Hive platform to my existing Traefik build or is it more trouble than its worth.  I wondering, more or less while making sure I'm not having a port conflict, if there's an easy way to have Traefik point a subdomain(subdomains are used for the other apps) to the 80/443 ports of the nginx proxy, and just have everything work.  My other option is to create another VM for the IOT platform. </p>

<p>I may be searching with the wrong terms but I haven't really found an answer. Any help?</p>

<p>Note: I want to use Device Hive on my existing server which is using Traefik. When I look at the docker compose file for Device Hive I don't see how I could change it to leave Nginx out.</p>

CC BY-SA 4.0
2018-11-08T12:58:30.303Z
if you look at the _function_ that these services are performing, it doesn't make sense to have 2 proxies (Traefik, Nginx) - unless you really need them for some performance or architecture reason. If you want to work with both,you can set the containers up on different ports and configure the apps behind them differently. But for your purposes it really feels like overkill. Can you explain what you want to get out of this exercise exactly?
Bruce Becker
<docker-compose><traefik>
How should I run a multicontainer app/platform with nginx behind traefik?
mwebuet
# How should I run a multicontainer app/platform with nginx behind traefik?

(Asked by: username_0 on 2018-11-08)

I have Traefik reverse proxy running to allow a couple of docker containerized apps to run on the same domain just to learn about running multiple containers following <https://www.smarthomebeginner.com/traefik-reverse-proxy-tutorial-for-docker>. Everything works well. I want to install Device Hive to test it as an IOT platform, but it has multiple containers and it's own nginx proxy and docker-compose file <https://github.com/devicehive/devicehive-docker/blob/master/rdbms-image/docker-compose.yml>.

Is there a way I can add the Device Hive platform to my existing Traefik build or is it more trouble than its worth. I wondering, more or less while making sure I'm not having a port conflict, if there's an easy way to have Traefik point a subdomain(subdomains are used for the other apps) to the 80/443 ports of the nginx proxy, and just have everything work. My other option is to create another VM for the IOT platform.

I may be searching with the wrong terms but I haven't really found an answer. Any help?

Note: I want to use Device Hive on my existing server which is using Traefik. When I look at the docker compose file for Device Hive I don't see how I could change it to leave Nginx out.

**Tags:** docker-compose, traefik

> **Comments:**
> **username_1**: if you look at the _function_ that these services are performing, it doesn't make sense to have 2 proxies (Traefik, Nginx) - unless you really need them for some performance or architecture reason. If you want to work with both,you can set the containers up on different ports and configure the apps behind them differently. But for your purposes it really feels like overkill. Can you explain what you want to get out of this exercise exactly?  

---

## 1 answers

### Answer by username_2 on 2020-01-02. Score: 1

Although I agree with @BruceBecker's comment, i.e. running two different rproxies, it is possible to run traefik in front of nginx. At the previous job we configured several servers that were running on nginx behind traefik.

Ensure that each microservice has the correct labels. Note that Traefik 2.0 changed significantly.

> **Comments:**
> **username_3**: But to answer the question, _should_ they run it this way?  

---

