コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
11923 ビュー

Hi!

I try to run a Odoo Docker container behind a NGINX reverse proxy. My problem is that the container is not answering on the specified port over HTTP and therefore the NGINX proxy_pass ends in a 502.


My docker-compose.yml:

version: '2'
services:
  db:
    image: 'postgres:9.4'
    restart: always
    environment:
      - POSTGRES_USER=odoo
      - POSTGRES_PASSWORD=odoo
      - PGDATA=/var/lib/postgresql/data/pgdata
    volumes:
      - '/srv/odoo/postgres/data:/var/lib/postgresql/data/pgdata'
  web:
    image: 'odoo:10.0'
    restart: always
    environment:
      - HOST=db
      - USER=odoo
      - PASSWORD=odoo
      - VIRTUAL_HOST=odoo.mycompany.io
      - VIRTUAL_PORT=8181
    depends_on:
      - db
    ports:
      - '8181:8096'
    volumes:
      - '/srv/odoo/data:/var/lib/odoo'
      - '/srv/odoo/extra-addons:/mtn/extra-addons'
      - '/srv/odoo/config:/etc/odoo'


And my nginx.conf:

server {

           listen 80;
           server_name odoo.mycompany.io;

           location / {
                proxy_pass http://localhost:8181;
                proxy_set_header Host $host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Forwarded-Proto http;
           }

            access_log /var/log/nginx/odoo-ssl-access.log;
            error_log /var/log/nginx/odoo-ssl-error.log;
        }


The error-log shows:

2017/06/09 14:45:41 [error] 9042#9042: *102 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: xx.xx.xx.xx, server: odoo.mycompany.io, request: "GET / HTTP/1.1", upstream: "http://[::1]:8181/", host: "odoo.mycompany.io"


 Can anyone please help me?


Thanks,

Thomas







アバター
破棄
最善の回答
 ports:      - '8181:8096'


I think odoo port should be 8069, not 8096

アバター
破棄
関連投稿 返信 ビュー 活動
0
2月 20
4315
1
10月 19
5248
2
1月 19
9449
1
11月 17
10401
6
12月 23
20558