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)

  • How to resolve docker connectivity after reboot on Mac
  • Automatic building and installing Packages from AUR for Arch Linux inside Docker with yaourt and >makepkg-4.2.0
  • Docker loading kernel modules
  • DataStax Enterprise on Docker: fails to start due to /hadoop/conf directory not being writable
  • wordpress Docker image with vagrant
  • How can I run multiple docker nodes on my laptop to simulate a cluster?
  • 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?

  • Getting started with Laradock on Mac
  • Docker - non-privileged user can write to / inside container
  • Ports are blocked: Can't install Docker Universal Control Plane on Ubuntu guest using VMware
  • Error while sharing local drive(volume) with docker for windows
  • Setting up docker agents in TFS
  • Why volume mapping does not work? [duplicate]
  • 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.