Sign inSign up

ilmuflone/odoo-12

By ilmuflone

•Updated about 3 years ago

Odoo 12.0 based on Debian 10 Buster with Python 3.7.3

Image
0

105

ilmuflone/odoo-12 repository overview

⁠Docker Odoo 12

Description: Docker for Odoo 12

Copyright: 2023 Fabio Castelli (Muflone) <muflone(at)muflone.com>

License: GPL-3+

Source code: https://github.com/muflone/docker-odoo12⁠

Documentation: http://www.muflone.com/docker-containers/⁠

⁠System Requirements

  • Docker (tested using v.24.05)

⁠Installation

Build the container using Docker build with:

docker build -t author/name:version .

or using Docker buildx with:

docker buildx build -t author/name:version .

⁠Environment Variables

Tweak these environment variables to easily connect to a postgres server:

  • ODOO_DATABASE_HOST: The address of the postgres server. If you used a postgres container, set to the name of the container. Defaults to postgres.
  • ODOO_DATABASE_PORT: The port the postgres server is listening to. Defaults to 5432.
  • ODOO_DATABASE_USER: The postgres role with which Odoo will connect. If you used a postgres container, set to the same value as POSTGRES_USER. Defaults to postgres.
  • ODOO_DATABASE_PASSWORD: The password of the postgres role with which Odoo will connect. If you used a postgres container, set to the same value as POSTGRES_PASSWORD. Defaults to password.

⁠Usage

To use Odoo you need also a running Postgres database. You can setup them both using the following docker-compose.yaml file:

version: '3'

services:
  app:
    image: ilmuflone/odoo-12:0.2.0
    restart: 'no'
    ports:
      - "8069:8069"
    env_file:
      - app.env
    volumes:
      - ./data:/opt/odoo/data
      - ./logs:/opt/odoo/logs

  db:
     image: postgres:15.3
     restart: 'no'
     volumes:
       - ./database:/var/lib/postgresql/data
     env_file:
       - ./database.env

Set your Postgres administrator credentials in database.env:

POSTGRES_USER=admin
POSTGRES_PASSWORD=admin

While you can setup your Postgres user credentials in app.env:

ODOO_DATABASE_HOST: db
ODOO_DATABASE_PORT: 5432
ODOO_DATABASE_USER: odoo
ODOO_DATABASE_PASSWORD: odoo

Finally start your containers using:

docker compose up -d

⁠Run Odoo with a custom configuration

You can set the /opt/odoo/odoo.conf configuration file like the following:

[options]
addons_path = /opt/odoo/src/addons
data_dir = /opt/odoo/data
http_port = 8069
proxy_mode = True
logfile = /opt/odoo/logs/server.log
pidfile = /opt/odoo/server.pid

Then you can mount your odoo.conf file by adding a line in your docker-compose.yaml file:

    ...
    volumes:
      - ./odoo.conf:/opt/odoo/odoo.conf:ro
    ...

Tag summary

Content type

Image

Digest

sha256:f92c652f9…

Size

567.1 MB

Last updated

about 3 years ago

docker pull ilmuflone/odoo-12:0.2.0