Odoo different versions (docker) with different databases on Ubuntu 20.04 #532

未关闭
#533 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
20/100
Issue 类型
文档
描述清晰度
需要澄清
活跃度
停滞
技术栈
docker, docker-compose, postgresql, python, ubuntu, vscode

调研方向

首先检查 issue 中针对 Odoo 16、17 和 18 的 Docker Compose 示例,以及对 odoo.conf、requirements.txt、PyCharm 和 Visual Studio Code 的引用。该 issue 没有指定 repository 文件或测试,因此首先明确是否要求修改文档,并定义预期的设置和验证标准。

由索引模型根据 Issue 内容生成。

描述

To set up separate Docker containers for Odoo versions 16, 17, and 18, and configure your development environment using PyCharm Community Edition or Visual Studio Code, follow these steps:

  1. Setting Up Separate Docker Containers for Each Odoo Version:

Create Separate Directories: For each Odoo version, create a separate directory to maintain isolation.

bash
Copy code
mkdir odoo16 odoo17 odoo18
Docker Compose Configuration: In each directory, create a docker-compose.yml file specifying the desired Odoo version and its dependencies. Here's an example for Odoo 16:

yaml
Copy code
version: '3'
services:
odoo:
image: odoo:16.0
ports:
- "8069:8069"
volumes:
- ./custom_addons:/mnt/extra-addons
environment:
- HOST=db
- USER=odoo
- PASSWORD=odoo
db:
image: postgres:13
environment:
- POSTGRES_USER=odoo
- POSTGRES_PASSWORD=odoo
Repeat this process for Odoo 17 and 18, adjusting the image tag accordingly.

Start Containers: Navigate to each directory and start the containers:

bash
Copy code
cd odoo16
docker-compose up -d
Repeat for odoo17 and odoo18.

  1. Configuring PyCharm Community Edition or Visual Studio Code:

PyCharm Community Edition:

Remote Development: Utilize the "Remote Repositories" feature to connect to your Docker containers.

Custom Addons: Mount your custom addons directory as a volume in the Docker container to enable real-time development.

Odoo Configuration (odoo.conf): Ensure the addons_path in your odoo.conf file includes the path to your custom addons.

Requirements (requirements.txt): Install necessary Python packages within the Docker container to match your development environment.

Visual Studio Code:

Remote Development: Use the "Remote - Containers" extension to develop inside your Docker containers.

Custom Addons: Similar to PyCharm, mount your custom addons directory to the container.

Odoo Configuration: Update the addons_path in odoo.conf to include your custom addons.

Requirements: Ensure all dependencies are installed within the container.

  1. Accessing Official Addons:

Official Odoo addons are available in the Odoo GitHub repository. You can clone the repository and include it in your addons_path for development purposes.

By following these steps, you can maintain separate environments for each Odoo version and configure your development tools accordingly.

For a detailed walkthrough on setting up Odoo 16 with PyCharm, you can refer to the following video:

主要语言
Dockerfile
星标
1.2k
派生
1.7k
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

odoo/docker 的其他 Issue

查看 odoo/docker 的全部 Issue

相似的 Issue

更多 Databases Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。