跳至内容
菜单
此问题已终结
2 回复
3755 查看

I have searched through documentation and previous forum posts, it is all unclear. With this post I aim to resolve this.


The docker image available at dockerhub (odoo) is for the community edition. If run, one will not have the enterprise features.


How are the enterprise features activated?


What the documentation and posts seem to say is that one copies the enterprise source code (an extracted tar.gz, named similar to odoo-18.0+e.20250224) into the mounted addons path, and install the web enterprise using the CLI and it would work, but I try to install an Industry and I still miss packages, and don't get prompted about a subscription code.


This is a base, community compose that works:


.pg.env and .env only contain database-related variables

services:

  odoo-postgres:

    container_name: odoo-postgres

    image: postgres:17.2-alpine3.21

    restart: unless-stopped

    env_file: .pg.env

    user: root

    # healthcheck:

    #   test: ["CMD-SHELL", "pg_isready", "-U", "postgres"]

    #   interval: 5s

    #   timeout: 60s

    #   retries: 10

    volumes:

      - ./pg-data:/var/lib/postgresql/data


  odoo:

    container_name: odoo

    image: odoo:18.0-20250218

    restart: unless-stopped

    user: root

    depends_on:

      - odoo-postgres

        # condition: service_healthy

    tty: true

    command: --

    env_file: .env

    volumes:

      # - ./entrypoint.sh:/entrypoint.sh   # if you want to install additional Python packages, uncomment this line!

      - /etc/localtime:/etc/localtime:ro

      - /etc/timezone:/etc/timezone:ro

      - ./addons:/mnt/addons

      - ./etc:/etc/odoo

形象
丢弃
最佳答案

If you want to install Enterprise via Docker, I suggest you don't use the image from the Docker Hub. Instead download the Enterprise Source Code  and use it like a normal python project.


The compose file may look like this

odoo:

    build: .

​ container_name: odoo_container

    volumes:

      - ./source_codes:/opt/odoo

      - ./custom_addons:/mnt/custom_addons

      - ./odoo.conf:/etc/odoo.conf

      - ./data:/var/lib/odoo


You also need to have Dockerfile that will install all Docker dependecy (eg Python, wkhtml, etc.), set the permission for the files and folders listed in volumes, and run the Odoo.

形象
丢弃
编写者 最佳答案

As an interim (maybe permanent) solution, I am running odoo enterprise directly on the host machine, and using docker compose to run a reverse proxy that serves it (the main purpose of the docker setup):


services:
​odoo-proxy:
​image: alpine
​extra_hosts:
​- "host.docker.internal:host-gateway"
​command: /bin/sh -c 'sleep infinity'
​ports:
​- "8069:8069"

postgres:
​image: postgres:alpine
​ports:
​- "5432:5432"

 

形象
丢弃
相关帖文 回复 查看 活动
2
11月 15
3586
3
3月 24
4344
3
9月 21
7369
1
12月 20
48253
1
1月 24
19318