Giter Site home page Giter Site logo

Comments (9)

lathama avatar lathama commented on May 29, 2024

Typically there is a proxy used for this you can read more at:

I some times use caddy for this eg https://hub.docker.com/_/caddy

from docker.

dtsoden avatar dtsoden commented on May 29, 2024

Typically there is a proxy used for this you can read more at:

I some times use caddy for this eg https://hub.docker.com/_/caddy

I did something similar and reconstructed the entire docker compose

version: '3.8'
services:
  web:
    image: odoo:17.0
    depends_on:
      - mydb
    ports:
      - "8069:8069"
    volumes:
      - web-data:/var/lib/odoo
      - addons:/mnt/extra-addons
    environment:
      - HOST=mydb
      - USER=odoo
      - PASSWORD=myodoo
  mydb:
    image: postgres:15
    environment:
      - POSTGRES_DB=postgres
      - POSTGRES_PASSWORD=myodoo
      - POSTGRES_USER=odoo
    volumes:
      - db-data:/var/lib/postgresql/data
  app:
    image: 'jc21/nginx-proxy-manager:latest'
    restart: unless-stopped
    ports:
      - '80:80'
      - '81:81'
      - '443:443'
    volumes:
      - data:/data
      - letsencrypt:/etc/letsencrypt

volumes:
  web-data:
  db-data:
  addons:
  data:
  letsencrypt:

https://nginxproxymanager.com

from docker.

lathama avatar lathama commented on May 29, 2024

If you are interested you can do a PR to https://github.com/docker-library/docs/blob/master/odoo/content.md but I have been waiting a while on one of mine so traction may be slow.

from docker.

dtsoden avatar dtsoden commented on May 29, 2024

perhaps you can help with this core and ROOT issue I am having. The website module and this version refuse to work normally with cloudflare tunnels or this nginx proxy manager. I have omitted proxy_mode, I have included it proxy_mode = True and turned it off proxy_mode = False and that setting in any state including missing has ZERO impact (each change I stop/start the container)

the problem is the website when you load up or pick the template from the initial setup or any time you go into edit mode to edit the site you get this error

Mixed Content: The page at 'https://xxxx.com/web#action=184&cids=1&menu_id=116' was loaded over HTTPS, but requested an insecure frame 'http://xxxx.com/'. This request has been blocked; the content must be served over HTTPS.

I also notice PARAMETERS > SYSTEM PARAMETERS > web.base.url = http://xxx and NOT https://xxx and I can change this... log out and come back in and it resets itself back to HTTP

the app in the container seams busted I can not resolve this mixed error and no one on the forums at Odoo seams to know what going on either. Opening a support ticket sends me to the fourms. I am about to toss in the white towel on Odoo and never look back.

from docker.

amh-mw avatar amh-mw commented on May 29, 2024

I also notice PARAMETERS > SYSTEM PARAMETERS > web.base.url = http://xxx and NOT https://xxx and I can change this... log out and come back in and it resets itself back to HTTP

Odoo automatically sets web.base.url unless you also set web.base.url.freeze. 1

Footnotes

  1. https://www.odoo.com/forum/help-1/system-parameters-web-base-url-143575

from docker.

dtsoden avatar dtsoden commented on May 29, 2024

I deleted the containers for the web and the DB, set it all back up and set the flag "web.base.url.freeze" value = "True" which now locks the URL but seems now unrelated to the underlying core issue in the setting up the web app / website after installing the website module

Mixed Content: The page at 'https://xxxx.com/web#action=184&cids=1&menu_id=116' was loaded over HTTPS, but requested an insecure frame 'http://xxxx.com/'. This request has been blocked; the content must be served over HTTPS.

I am missing something else? Is this normal to have so much trouble setting this system up?

from docker.

amh-mw avatar amh-mw commented on May 29, 2024

I don't use nginx in production, but I use it locally for testing Odoo 15 with docker-compose similar to yours above and /etc/nginx/conf.d/default.conf set to

# https://linuxize.com/post/configure-odoo-with-nginx-as-a-reverse-proxy/

server {
    listen 80 default_server;
    listen [::]:80 default_server;

    return 301 https://$host$request_uri;
}

server {
    listen 443 ssl;
    listen [::]:443 ssl;
    http2 on;

    ssl_certificate /etc/ssl/certs/nginx.pem;
    ssl_certificate_key /etc/ssl/private/nginx.key;

    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Host $host;
    proxy_set_header X-Forwarded-Proto $scheme;

    location / {
        client_max_body_size 128M;
        proxy_pass http://web:8069;
    }

    location /longpolling {
        proxy_pass http://web:8072;
    }
}

Please note that /longpolling is renamed to /websocket in more recent versions.

from docker.

dtsoden avatar dtsoden commented on May 29, 2024

really do appreciate the post and attempts to help sort this.

https://nginxproxymanager.com is what I am using in a local home lab

https://hub.docker.com/r/jc21/nginx-proxy-manager is the container and its all GUI
then I am using https://hub.docker.com/_/odoo

the code you have not sure where something like that may go but I keep seeing similar posted all over the net. I can not for the life of me find that nginx is installed on the odoo web container (is this even docker at all or a from source install or something else). Seams there is no Apachee either which is normal for the underlying OS of the web container 22.04.4 LTS (Jammy Jellyfish). I think odoo has its only built-in webserver/service hence all the switches - but again this seams to be for source installs as the entrypoint.sh file in docker does all this heavy lifting

thats above is all a tangent rant - is there some reason why only a select functions is broken like editing the website where http is being FORCED and causing the MIXED CONTENT error? if this were related to cloudflare the https://nginxproxymanager.com it would be boolean right? like broken or not broken fully... it would not break partially - there must be some internal mechanism causing this?

any odoo 17 folks that can verify this is busted or tell me what I am likely ignorantly missing?

from docker.

amh-mw avatar amh-mw commented on May 29, 2024

I can not for the life of me find that nginx is installed on the odoo web container (is this even docker at all or a from source install or something else).

nginx gets its own container, which appears to be represented in your docker-compose.yaml above as app, in contrast to the odoo web container.

Seams there is no Apachee either which is normal for the underlying OS of the web container 22.04.4 LTS (Jammy Jellyfish). I think odoo has its only built-in webserver/service hence all the switches

odoo uses python Werkzeug; Apache is not involved.

if this were related to cloudflare the https://nginxproxymanager.com it would be boolean right? like broken or not broken fully... it would not break partially - there must be some internal mechanism causing this?

I am unfamiliar with both cloudflare and nginxproxymanager. Temporarily exclude them? Use a stock nginx container locally with a self-signed certificate, i.e.:

  app:
    image: nginx:1
    depends_on:
      - web
    ports:
      - 80:80
      - 443:443
    volumes:
      - ./nginx.conf:/etc/nginx/conf.d/default.conf
      - ./nginx.key:/etc/ssl/private/nginx.key
      - ./nginx.pem:/etc/ssl/certs/nginx.pem

Simplify until a configuration works, then add complexity back one piece at a time.

from docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.