Letsencrpyt docker reverse proxy for Odoo (non standard app running on port 8069)

    • OMV 4.x
    • Letsencrpyt docker reverse proxy for Odoo (non standard app running on port 8069)

      I run a constellation based on the tutorial from TDF with nextcloud, letsencrypt and supplementary I run a odoo 10.0 docker plus a postgres one (required by odoo). Details about the Odoo docker are here: hub.docker.com/_/odoo

      Basically odoo is running and is available on myserver:8069 (also externally from mydomain.com:8069) and I would like to reverse proxy to it. For this I will use a sub.mydomain.com that is already pointing to my Letsencrpt docker.

      Could somebody help me write a odoo.subdomain.conf for my reverse proxy?

      I am not a nginx guy, while I started 20+ years ago with apache and stick with it while it lasted. I will put some efforts into documentation this weekend to see if I eventually could get it through.

      what is worth mentioning is that I did not manage to add these 2 dockers (odoo and postgres) in the same network as the other ones (letsencrypt, nextcloud, etc)...

      Thanks a bunch!
    • why did it not work out to connect the Dockers in a network? This would be the easiest solution. Have you tried it via the network tab of the docker gui?

      An example .conf would look like this(after joining odoo and letsencrypt in a network):

      Source Code: odoo.subdomain.conf

      1. server {
      2. listen 443 ssl;
      3. listen [::]:443 ssl;
      4. server_name sub.*; #The name of your specified subdomain
      5. include /config/nginx/ssl.conf;
      6. client_max_body_size 0;
      7. location / {
      8. # enable the next two lines for http auth
      9. #auth_basic "Restricted";
      10. #auth_basic_user_file /config/nginx/.htpasswd;
      11. include /config/nginx/proxy.conf;
      12. resolver 127.0.0.11 valid=30s;
      13. set $upstream_odoo odoo;
      14. proxy_pass https://$upstream_odoo:8069;
      15. }
      16. }
      Display All

      This goes into the proxy-confs folder. And a restart of the letsencrypt container is needed afterwards.