Odoo different versions (docker) with different databases on Ubuntu 20.04 #532
Nobody has claimed this yet.
- Dominant language
- Dockerfile
- Stars
- 1.2k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
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:
- 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.
- 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.
- 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:
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the issue's Docker Compose examples for Odoo 16, 17, and 18, along with the references to odoo.conf, requirements.txt, PyCharm, and Visual Studio Code. The issue does not name repository files or tests, so first clarify whether a documentation change is requested and define the expected setup and verification criteria.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, docker-compose, postgresql, python, ubuntu, vscode
- Domain
- databases, developer-experience, devops
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100