コンテンツへスキップ
Odoo メニュー
  • サインイン
  • 無料で15日試す
  • アプリ
    財務
    • 会計
    • 請求
    • 経費
    • スプレッドシート(BI)
    • ドキュメント管理
    • 署名
    販売
    • CRM
    • 販売
    • POS店舗
    • POSレストラン
    • サブスクリプション
    • レンタル
    ウェブサイト
    • ウェブサイトビルダー
    • eコマース
    • ブログ
    • フォーラム
    • ライブチャット
    • eラーニング
    サプライチェーン
    • 在庫
    • 製造
    • 製品ライフサイクル管理 (PLM)
    • 購買
    • 整備
    • 品質
    人事業務
    • 従業員管理
    • 採用
    • 休暇管理
    • 人事評価
    • リファラル
    • フリート
    マーケティング
    • ソーシャルマーケティング
    • メールマーケティング
    • SMSマーケティング
    • イベント
    • マーケティングオートメーション
    • アンケート調査
    サービス
    • プロジェクト管理
    • タイムシート
    • フィールドサービス
    • ヘルプデスク
    • 計画
    • アポイントメント
    生産性向上ツール
    • ディスカッション
    • 承認
    • IoT
    • VoIP
    • ナレッジ
    • WhatsApp
    サードパーティアプリ Odooスタジオ Odooクラウドプラットホーム
  • インダストリー(業種別ソリューション)
    小売
    • 書店
    • アパレルショップ
    • 家具専門店
    • 食料品店
    • 金物店
    • 玩具店
    飲食・ホスピタリティ業界
    • バー・パブ
    • レストラン
    • ファストフード
    • ゲストハウス
    • 飲料販売代理店
    • ホテル
    不動産
    • 不動産会社
    • 建築事務所
    • 建設
    • 不動産管理
    • 造園
    • 住宅所有者組合
    コンサルティング
    • 会計事務所
    • Odooパートナー
    • マーケティングエージェンシー
    • 法律事務所
    • 人材派遣
    • 監査・認証
    製造
    • テキスタイル
    • 金属
    • 家具
    • 飲食
    • 醸造所
    • コーポレートギフト
    ヘルス & フィットネス
    • スポーツクラブ
    • 眼鏡店
    • フィットネスセンター
    • ウェルネス専門家
    • 薬局
    • ヘアサロン
    業種
    • 便利屋
    • IT ハードウェア・サポート
    • 太陽エネルギーシステム
    • 靴メーカー
    • クリーニングサービス
    • 空調設備サービス
    その他
    • 非営利団体
    • 環境機関
    • ビルボードレンタル
    • 写真
    • 自転車リース
    • ソフトウェアリセラー
    すべての業種を見る
  • コミュニティ
    学ぶ
    • チュートリアル
    • ドキュメンテーション
    • 認定
    • トレーニング
    • ブログ
    • ポッドキャスト
    教育サポート
    • 教育プログラム
    • Scale Up! ビジネスゲーム
    • Odooオフィス訪問
    ソフトを入手
    • ダウンロード
    • エディションを比較
    • リリース
    コラボレーション
    • Github
    • フォーラム
    • イベント
    • 翻訳
    • パートナーになる
    • パートナー様向けサービス
    • 会計事務所を登録
    サービス利用
    • パートナー一覧
    • 会計事務所一覧
    • 今すぐ相談する
    • 導入支援サービス
    • お客様一覧
    • サポート
    • アップグレード
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    製品デモを利用する
  • 料金
  • ヘルプ

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

  • CRM
  • e-Commerce
  • 会計
  • 在庫
  • PoS
  • プロジェクト
  • MRP
All apps
コミュニティで交流するには登録する必要があります。
全てのポスト 人々 バッジ
タグ (全て表示)
odoo accounting v14 pos v15
このフォーラムについて
コミュニティで交流するには登録する必要があります。
全てのポスト 人々 バッジ
タグ (全て表示)
odoo accounting v14 pos v15
このフォーラムについて
ヘルプ

Odoo Docker Setup - How To?

購読

この投稿に活動があった際に通知を受け取ります

この質問にフラグが付けられました
ubuntuodoodocker
2 返信
15014 ビュー
アバター
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
アバター
破棄
Roshan
著作者

any hope to get help ???

Roshan
著作者

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


アバター
Roshan
著作者 最善の回答

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
アバター
破棄
アバター
Gracious Joseph
最善の回答

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
アバター
破棄
ディスカッションを楽しんでいますか?読むだけでなく、参加しましょう!

今すぐアカウントを作成して、限定機能を利用したり、素晴らしいコミュニティと交流しましょう!

登録
関連投稿 返信 ビュー 活動
How to clear cache after change data_dir path
odoo docker
アバター
アバター
1
6月 25
11930
Unable to update app list in dockerized odoo
odoo docker
アバター
アバター
1
11月 22
4860
How to install addon modules using Odoo doodba
odoo docker
アバター
アバター
1
11月 20
6985
ERROR: couldn't create the logfile directory. Logging to the standard output.
odoo docker
アバター
アバター
6
6月 20
23802
Problem with my odoo installation on ubuntu server
ubuntu odoo
アバター
アバター
1
7月 19
20585
コミュニティ
  • チュートリアル
  • ドキュメンテーション
  • フォーラム
オープンソース
  • ダウンロード
  • Github
  • Runbot
  • 翻訳
サービス
  • Odoo.shホスティング
  • サポート
  • アップグレード
  • カスタム開発
  • 教育プログラム
  • 会計事務所一覧
  • パートナー一覧
  • パートナーになる
企業情報
  • 会社概要
  • ブランドアセット
  • お問い合わせ
  • 採用情報
  • イベント
  • ポッドキャスト
  • ブログ
  • お客様一覧
  • リーガル情報 • プライバシーポリシー
  • セキュリティ
الْعَرَبيّة 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(オドゥー)は、CRM、eコマース、会計、在庫管理、POS、プロジェクト管理など、企業のさまざまな業務を一つのシステムで管理できる、ベルギー発のオープンソースのERPソフトウェアです。

高機能で使いやすく、完全に統合されたERPとして、ユニークな価値を提供しています。

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