Skip to Content
Odoo Menu
  • Prisijungti
  • Išbandykite nemokamai
  • Programėlės
    Finansai
    • Apskaita
    • Pateikimas apmokėjimui
    • Sąnaudos
    • Skaičiuoklė (BI)
    • Dokumentai
    • Pasirašymas
    Pardavimai
    • CRM
    • Pardavimai
    • Kasų sistema - Parduotuvė
    • Kasų sistema - Restoranas
    • Prenumeratos
    • Nuoma
    Svetainės
    • Svetainių kūrėjimo įrankis
    • El. Prekyba
    • Internetinis Tinklaraštis
    • Forumas
    • Tiesioginis pokalbis
    • eMokymasis
    Tiekimo grandinė
    • Atsarga
    • Gamyba
    • PLM
    • Įsigijimai
    • Priežiūra
    • Kokybė
    Žmogaus ištekliai
    • Darbuotojai
    • Įdarbinimas
    • Atostogos
    • Įvertinimai
    • Rekomendacijos
    • Transporto priemonės
    Rinkodara
    • Socialinė rinkodara
    • Rinkodara el. paštu
    • SMS rinkodara
    • Renginiai
    • Rinkodaros automatizavimas
    • Apklausos
    Paslaugos
    • Projektas
    • Darbo laiko žiniaraščiai
    • Priežiūros tarnyba
    • Pagalbos tarnyba
    • Planavimas
    • Rezervacijos
    Produktyvumas
    • Diskucija
    • Patvirtinimai
    • IoT
    • VoIP
    • Žinių biblioteka
    • WhatsApp
    Trečiųjų šalių programos Odoo Studija Odoo debesijos platforma
  • Pramonės šakos
    Mažmeninė prekyba
    • Knygynas
    • Drabužių parduotuvė
    • Baldų parduotuvė
    • Maisto prekių parduotuvė
    • Techninės įrangos parduotuvė
    • Žaislų parduotuvė
    Food & Hospitality
    • Barai ir pub'ai
    • Restoranas
    • Greitasis maistas
    • Guest House
    • Gėrimų platintojas
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architektūros įmonė
    • Konstrukcija
    • Estate Managament
    • Sodininkauti
    • Turto savininkų asociacija
    Consulting
    • Accounting Firm
    • Odoo Partneris
    • Marketing Agency
    • Teisinė firma
    • Talentų paieška
    • Auditai & sertifikavimas
    Gamyba
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Įmonių dovanos
    Sveikata & Fitnesas
    • Sporto klubas
    • Akinių parduotuvė
    • Fitneso Centras
    • Sveikatos praktikai
    • Vaistinė
    • Kirpėjas
    Trades
    • Handyman
    • IT įranga ir palaikymas
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Aplinkos agentūra
    • Reklaminių stendų nuoma
    • Fotografavimas
    • Dviračių nuoma
    • Programinės įrangos perpardavėjas
    Browse all Industries
  • Bendrija
    Mokykitės
    • Mokomosios medžiagos
    • Dokumentacija
    • Sertifikatai
    • Mokymai
    • Internetinis Tinklaraštis
    • Tinklalaidės
    Skatinkite švietinimą
    • Švietimo programa
    • Scale Up! Verslo žaidimas
    • Aplankykite Odoo
    Gaukite programinę įrangą
    • Atsisiųsti
    • Palyginkite versijas
    • Leidimai
    Bendradarbiauti
    • Github
    • Forumas
    • Renginiai
    • Vertimai
    • Tapkite partneriu
    • Services for Partners
    • Registruokite jūsų apskaitos įmonę
    Gaukite paslaugas
    • Susiraskite partnerį
    • Susirask buhalterį
    • Susitikti su konsultantu
    • Diegimo paslaugos
    • Klientų rekomendavimas
    • Palaikymas
    • Atnaujinimai
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Gaukite demo
  • Kainodara
  • Pagalba

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Apskaita
  • Atsarga
  • PoS
  • Projektas
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Žymos (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Žymos (View all)
odoo accounting v14 pos v15
About this forum
Pagalba

Odoo Docker Setup - How To?

Prenumeruoti

Get notified when there's activity on this post

This question has been flagged
ubuntuodoodocker
2 Replies
15137 Rodiniai
Portretas
Roshan

I am using Ubuntu 22.04, current OS user is 'odoo'.

I want to install Odoo using Docker for development. I will create all Docker Containers for different versions of Odoo (like 15,16,17...) after successfully created one, I want to keep versions separate in their Containers.

I searched Internet for same but yet failed to find about is there any need to install Python3 and Pycharm within Docker Container or Not?

if Not then how I can install and done development tasks using Python3, PostgreSQL and Pycharm? how to configure Pycharm for all installed versions and anything else too?

it's humble request to the community members to please help.

with regards


0
Portretas
Atmesti
Roshan
Autorius

any hope to get help ???

Roshan
Autorius

thank you very much @Gracious Joseph for reply and detailed guidance, very few people can do it. i will check it and reply here.

with kind regards


Portretas
Roshan
Autorius Best Answer

hi @Gracious Joseph

i tried to follow as per your instructions as below, just made one change in your ~/odoo_docker/odoo16/docker-compose.yml file, I used image: postgres:16 instead of postgres:13:


odoo@odoo-VirtualBox:~$ pwd

/home/odoo

sudo apt install -y docker(dot)io docker-compose

sudo systemctl start docker

sudo systemctl enable docker

odoo@odoo-VirtualBox:~$ mkdir odoo-docker

odoo@odoo-VirtualBox:~$ cd odoo-docker

odoo@odoo-VirtualBox:~$ mkdir odoo15

odoo@odoo-VirtualBox:~$ mkdir odoo16

odoo@odoo-VirtualBox:~$ mkdir odoo17

odoo@odoo-VirtualBox:~$ cd ~/odoo-docker/odoo16

doo@odoo-VirtualBox:~/odoo-docker/odoo16$ sudo docker-compose up -d

[sudo] password for odoo:

Creating network "odoo16_default" with the default driver

Pulling odoo (odoo:16)...

16: Pulling from library/odoo

Digest: sha256:2ec9878811bc973198e1683c03e758344c4232ee88fcd8409ed444b9179a13ca

Status: Downloaded newer image for odoo:16

Creating odoo16-db ... done

Creating odoo16    ... done


odoo@odoo-VirtualBox:~/odoo-docker/odoo16$ ls -la

total 24

drwxrwxr-x  5 odoo             odoo 4096 Dec  9 10:59 .

drwxrwxr-x  5 odoo             odoo 4096 Dec  9 10:43 ..

-rw-rw-r--  1 odoo             odoo  565 Dec  9 10:53 docker-compose.yml

drwxr-xr-x  2 root             root 4096 Dec  9 10:57 odoo_addons

drwxr-xr-x  2 root             root 4096 Dec  9 10:57 odoo_data

drwx------ 19 systemd-coredump root 4096 Dec  9 10:57 postgres_data

odoo@odoo-VirtualBox:~/odoo-docker/odoo16$ sudo chown -R odoo:odoo odoo_addons

odoo@odoo-VirtualBox:~/odoo-docker/odoo16$ sudo chown -R odoo:odoo odoo_data

odoo@odoo-VirtualBox:~/odoo-docker/odoo16$ ls postgres_data/

ls: cannot open directory 'postgres_data/': Permission denied

odoo@odoo-VirtualBox:~/odoo-docker/odoo16$ sudo chown -R odoo:odoo cd

[sudo] password for odoo:

odoo@odoo-VirtualBox:~/odoo-docker/odoo16$

odoo@odoo-VirtualBox:~/odoo-docker/odoo16$  docker-compose up -d

ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.


when running with: 

doo@odoo-VirtualBox:~/odoo-docker/odoo16$ sudo docker-compose up -d

odoo16-db is up-to-date

odoo16 is up-to-date

and trying to access in web browser http://localhost:8069 it is not showing odoo initial page instead below errors.

Unable to connect

Firefox can’t establish a connection to the server at localhost:8015.


here i stuck for the above and also for last folder postgres_data, can't change owner:group and permission, how i can test things will work fine or not.

please advise

with kind regards

0
Portretas
Atmesti
Portretas
Gracious Joseph
Best Answer

Setting up Odoo with Docker for development on Ubuntu 22.04 is a practical approach, especially when working with multiple Odoo versions like 15, 16, and 17. Here’s a comprehensive guide tailored to your requirements:

1. Prerequisites

Before starting, ensure you have the following installed on your Ubuntu system:

  • Docker and Docker Compose:
    bashCopy codesudo apt update
    sudo apt install -y docker.io docker-compose
    sudo systemctl start docker
    sudo systemctl enable docker
    
  • Python 3.x (for development outside Docker if needed):
    bashCopy codesudo apt install python3 python3-pip
    

2. Set Up Directory Structure

Organize your project for multiple Odoo versions. For example:

javascriptCopy code~/odoo_docker/
├── odoo15/
├── odoo16/
└── odoo17/

Each version will have its Docker Compose file, configuration, and optional custom modules directory.

3. Create Docker Compose File

Create a docker-compose.yml file for each version in its respective folder.

Example for Odoo 16 (~/odoo_docker/odoo16/docker-compose.yml):

yamlCopy codeversion: '3.1'

services:
  db:
    image: postgres:13
    container_name: odoo16-db
    environment:
      - POSTGRES_USER=odoo
      - POSTGRES_PASSWORD=odoo
      - POSTGRES_DB=postgres
    volumes:
      - ./postgres_data:/var/lib/postgresql/data
    restart: always

  odoo:
    image: odoo:16
    container_name: odoo16
    depends_on:
      - db
    ports:
      - "8069:8069"
    environment:
      - HOST=db
      - USER=odoo
      - PASSWORD=odoo
    volumes:
      - ./odoo_addons:/mnt/extra-addons
      - ./odoo_data:/var/lib/odoo
    restart: always

4. Start Docker Containers

Navigate to the folder for the desired version and start the containers:

bashCopy codecd ~/odoo_docker/odoo16
docker-compose up -d
  • The database will persist in the postgres_data volume.
  • Additional custom modules can be added to the odoo_addons directory.

Repeat for other versions (15, 17) by creating separate configurations.

5. Configure Pycharm for Development

To use PyCharm for Odoo development:

  1. Install PyCharm: Download and install PyCharm Professional or Community edition from JetBrains.
  2. Configure PyCharm with Docker Interpreter:
    • Open PyCharm and go to Settings > Project > Python Interpreter.
    • Add a new interpreter and choose Docker.
    • Select the Odoo Docker container (e.g., odoo16) as the interpreter.
    • This allows PyCharm to use the Python environment inside the Docker container for development.
  3. Set Up Project Folder:
    • Add the Odoo source code (if available) and the odoo_addons directory to your project in PyCharm.
    • Configure Odoo's addons path in the container to include mnt/extra-addons.

6. Development Workflow

  • Modify or create custom modules in odoo_addons.
  • Restart the Odoo container to apply changes:
    bashCopy codedocker-compose restart odoo
    
  • Access Odoo at http://localhost:8069 for testing.

7. Managing Multiple Versions

Each version runs independently in its Docker container with its database. To avoid port conflicts:

  • Change the exposed port for each version in the docker-compose.yml:
    yamlCopy codeports:
      - "8070:8069"  # For Odoo 15
      - "8071:8069"  # For Odoo 17
    

8. Best Practices

  • Use Docker volumes to persist data and avoid losing work.
  • Use the same PostgreSQL user/password for consistency across containers.
  • If you need to test Python dependencies, install them directly in the container or on the host system.

9. Advanced Setup

  • Enable Debugging in PyCharm:
    • Set breakpoints in your custom module.
    • Configure the Docker container to run in debug mode.
  • Use VSCode as an Alternative:
    • Install the Remote - Containers extension for developing inside Docker.

Example Commands

  • Stop a specific container:
    bashCopy codedocker-compose down
    
  • View container logs:
    bashCopy codedocker logs odoo16
    
  • Remove all containers and volumes:
    bashCopy codedocker-compose down -v
    

Summary

With this setup:

  • Each Odoo version is isolated in its Docker container.
  • Development can be done using PyCharm or other tools with Docker integration.
  • PostgreSQL and custom modules are managed separately for each version.

Feel free to ask if you need further clarification or assistance with specific configurations!

0
Portretas
Atmesti
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Registracija
Related Posts Replies Rodiniai Veikla
How to clear cache after change data_dir path
odoo docker
Portretas
Portretas
1
birž. 25
11942
Unable to update app list in dockerized odoo
odoo docker
Portretas
Portretas
1
lapkr. 22
4867
How to install addon modules using Odoo doodba
odoo docker
Portretas
Portretas
1
lapkr. 20
6999
ERROR: couldn't create the logfile directory. Logging to the standard output.
odoo docker
Portretas
Portretas
6
birž. 20
23810
Problem with my odoo installation on ubuntu server
ubuntu odoo
Portretas
Portretas
1
liep. 19
20601
Bendrija
  • Mokomosios medžiagos
  • Dokumentacija
  • Forumas
Atvirasis kodas
  • Atsisiųsti
  • Github
  • Runbot
  • Vertimai
Paslaugos
  • Odoo.sh talpinimas
  • Palaikymas
  • Atnaujinti
  • Pritaikytas programavimo kūrimas
  • Švietimas
  • Susirask buhalterį
  • Susiraskite partnerį
  • Tapkite partneriu
Apie mus
  • Mūsų įmonė
  • Prekės ženklo turtas
  • Susisiekite su mumis
  • Darbo pasiūlymai
  • Renginiai
  • Tinklalaidės
  • Internetinis Tinklaraštis
  • Klientai
  • Teisinis • Privatumas
  • Saugumas
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo yra atvirojo kodo verslo programų rinkinys, kuris apima visas įmonės poreikius: CRM, El. Prekybą, Apskaitą, Atsargų, Kasų sistemą, Projektų valdymą ir kt.

Unikali Odoo vertės pasiūla – būti tuo pačiu metu labai lengvai naudojama ir visiškai integruota sistema.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now