Skip to content

vdx-vn/odoo-docker-compose

Repository files navigation

Odoo's installation using Docker compose

Requirements

Running Odoo

  1. Copy custom addons to the folder custom-addons/

  2. Create a configuration file named odoo.conf in the folder etc/
    you can reference to the sample config file

  3. Create a file named password.txt in the postgresql/ folder to securely store the DB password

  4. Run Odoo

    cd $ODOO_DOCKER_PATH
    docker compose up -d 
  5. Access your Odoo instance at http://localhost

  6. (Optionally) Add extra Python libraries to the requirements.txt file

  7. (Optionally) Edit Dockerfile to add extra system libraries

  8. (Optionally) Setup log rotatation (on host machine)

    cd $ODOO_DOCKER_PATH/scripts
    sudo /bin/bash setup-logrotate.sh
  9. (Optionally) To run Odoo with extra commands, add the command param to the etc/odoo.conf file

  • For instance:

    • Update config file

      ...
      command = -d odoo_db -i stock -u sale_management
      
    • Restart services

      docker compose restart

Tip and Tricks

  docker exec <odoo_container_name_or_id> odoo populate --models res.partner,product.product --size medium -c /etc/odoo/odoo.conf
  • run postgresql by docker
docker run --name postgresql-15 -p 5432:5432 \
 -e POSTGRES_USER=admin \
 -e POSTGRES_PASSWORD=admin \
 -e POSTGRES_DB=postgresdb \
 -d --restart unless-stopped \
 postgres:15

Problems and Solutions

  • Run multiple docker compose with the same config in the same folder name, the new one will override the others,

    ** Solution:

    Specify a project name for each docker compose file to diffentiate them

  • If you run docker compose in Windows and got problem

    entrypoint.sh file not found

    ** Solution:

    • open file this project in VSCode or Pycharm

    • make sure encoding option and line separator is correct

      alt

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published