Running Odoo behind nginx with docker

I’m running multiple instances of odoo on the same machine using docker, every instance is ran on a different port and binded to 0.0.0.0
let’s say:

odoo_1 is bound to 0.0.0.0:8069
odoo_2 is bound to 0.0.0.0:8070

I want to map each of these instances to a subdomain using nginx. I found this article but it seems like he’s talking about containers that are not bound to hosts (sorry I’m new to docker)

  • Is it possible to assign a static IP adress to a docker container after it's creation?
  • Run SpringBoot-based docker image return error message:Invalid or corrupt jarfile /app.jar
  • Is this correct way to deploy springboot cloud netflix in production on multi host network?
  • Docker run can't run python image- IndentationError: expected an indented block
  • accessing services outside kubernetes
  • Upgrade of docker gitlab image to 8.6 breaks gitlab
  • http://jasonwilder.com/blog/2014/03/25/automated-nginx-reverse-proxy-for-docker/

    To make my need clear, I need a way to generate an nginx config file for every odoo instance running with docker, given the mapping of port -> domain/subdomain.

    Any ideas?

  • Docker Compose and rabbitmq docker image plugins
  • Can't connect to db docker container
  • Windows based couchbase image for docker
  • Monitoring docker with prometheus - cpu usage looks the same for different containers
  • Why can't you install docker natively in osx? [closed]
  • How to setup docker-machine to be as default?
  • One Solution collect form web for “Running Odoo behind nginx with docker”

    Running Odoo container with Nginx proxy – multi tenant setup, fast and dirty but works well:

    https://github.com/swoldanski/odoo-nginx-docker-multitenant

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.