콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
194 화면

Hi all.

I'm having an Odoo 18 running in docker. All works fine, except the subject issue. I'm stuck, because all real-time services seems to be working - user status updates, chat (I see that someone is typing a message to me when chat is open), notifications, etc. All except the kanban real-time update.

I have following configs (according to best practices, as I'm concerned 🙂):

docker-compose:

services:
  db:
    image: postgres:15
    container_name: odoo-crm-db-1
    environment:
      POSTGRES_DB: my_db
      POSTGRES_USER: my_user
      POSTGRES_PASSWORD: my_pwd
    volumes:
      - db-data:/var/lib/postgresql/data
    networks:
      - odoo-net

# UI container
  web:
    image: odoo:18.0
    container_name: odoo-crm-web-1
    depends_on:
      - db
    environment:
      - HOST=db
      - USER=my_user
      - PASSWORD=my_pwd
    volumes:
      - ./addons:/mnt/extra-addons
      - ./odoo.conf:/etc/odoo/odoo.conf
      - odoo-web-data:/var/lib/odoo
    ports:
      - "8069:8069"
    networks:
      - odoo-net

# Background container
  bus:
    image: odoo:18.0
    container_name: odoo-crm-bus-1
    depends_on:
      - db
    environment:
      - HOST=db
      - USER=my_user
      - PASSWORD=my_pwd
    volumes:
      - ./addons:/mnt/extra-addons
      - ./bus.conf:/etc/odoo/odoo.conf
      - odoo-web-data:/var/lib/odoo
    ports:
      - "8072:8072"     
    networks:
      - odoo-net

# cron container
  cron:
    image: odoo:18.0
    container_name: odoo-crm-cron-1
    depends_on:
      - db
    environment:
      - HOST=db
      - USER=my_user
      - PASSWORD=my_pwd
    volumes:
      - ./addons:/mnt/extra-addons
      - ./cron.conf:/etc/odoo/odoo.conf
      - odoo-web-data:/var/lib/odoo
    networks:
      - odoo-net
     
  nginx:
    image: nginx:latest
    container_name: odoo-crm-nginx-1
    depends_on:
      - web
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./nginx/conf.d:/etc/nginx/conf.d
      - ./nginx/certs:/etc/nginx/certs
      - ./nginx/log:/var/log/nginx
    networks:
      - odoo-net

volumes:
  db-data:
  odoo-web-data:

networks:
  odoo-net:
        driver: bridge


odoo.conf:

[options]
addons_path = /mnt/extra-addons
data_dir = /var/lib/odoo

#default official config:
limit_memory_hard = 1677721600
limit_memory_soft = 629145600
limit_request = 8192
limit_time_cpu = 600
limit_time_real = 1200

#for web only
max_cron_threads = 0
workers = 15
xmlrpc_port = 8069
longpolling_port = False

bus.conf:

[options]
addons_path = /mnt/extra-addons
data_dir = /var/lib/odoo

# Longpolling/background workers only
workers = 15
max_cron_threads = 0
gevent_port = 8072
longpolling_port = False

cron.conf:

[options]
addons_path = /mnt/extra-addons
data_dir = /var/lib/odoo

limit_memory_hard = 1677721600
limit_memory_soft = 629145600
limit_request = 8192
limit_time_cpu = 600
limit_time_real = 1200

# for cron only
max_cron_threads = 15
workers = -1
no_http = True

odoo.conf (nginx):

map $http_upgrade $connection_upgrade {
  default upgrade;
  ''      close;
}

# http -> https
server {
  listen 80;
  server_name test.my.website;
  rewrite ^(.*) https://$host$1 permanent;
}

server {
  listen 443 ssl;
  server_name test.my.website;
  proxy_read_timeout 720s;
  proxy_connect_timeout 720s;
  proxy_send_timeout 720s;

  # SSL parameters
  ssl_certificate     /etc/nginx/certs/fullchain.pem;
  ssl_certificate_key /etc/nginx/certs/privkey.pem;
  ssl_session_timeout 30m;
  ssl_protocols TLSv1.2;
  ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
  ssl_prefer_server_ciphers off;

  # Redirect requests to odoo backend server
  location / {
    # Add Headers for odoo proxy mode
    proxy_pass http://web:8069;
    proxy_set_header X-Forwarded-Host $http_host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  }

  # Redirect websocket requests to odoo gevent port
  location /websocket {
    proxy_pass http://bus:8072;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $connection_upgrade;
    proxy_set_header X-Forwarded-Host $http_host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Real-IP $remote_addr;

    add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
    proxy_cookie_flags session_id samesite=lax secure;
  }

  # common gzip
  gzip_types text/css text/scss text/plain text/xml application/xml application/json application/javascript;
  gzip on;
}

Any ideas or suggestions are highly appreciated!

아바타
취소
베스트 답변

Hello Lucas,



  It sounds like you're experiencing issues with real-time updates in the Kanban view of Odoo 18 running in a Docker environment. This is often related to the configuration of the Odoo longpolling service (bus) and how it's handled by your reverse proxy (Nginx in your case). Here are some steps to troubleshoot and potentially resolve the issue:

  1. Verify that the Odoo and PostgreSQL containers are running without errors. You can check this by viewing the container logs.

  2. Ensure that the longpolling port (8072) is correctly exposed and configured in both your Odoo and Nginx configurations. It seems you have this set up, but double-check that there are no typos or misconfigurations.

  3. In your Nginx configuration, under the /websocket location, ensure that the proxy_pass directive is correctly pointing to the longpolling service (bus:8072). This is crucial for real-time updates.

  4. Confirm that your firewall or any network security settings are not blocking WebSocket connections or the specific ports Odoo uses for its services.

  5. Lastly, restart your Docker containers after making any changes to ensure that all configurations are applied correctly.


For personalized assistance:
https://www.pragtech.co.in/contact-us-mql.html

아바타
취소
관련 게시물 답글 화면 활동
0
2월 24
2060
2
10월 23
2207
Project and Tasks 해결 완료
1
7월 23
2409
0
3월 22
3235
2
6월 20
5889