Skip to Content
Menu
This question has been flagged
2 Replies
4966 Views

Hello 

I want to setup multiple instance of odoo inside docker

Actually i have to setup a postgress container for each odoo container

To optimise resource can i use one shared postgress container and eache database will have a user and a password for security



Avatar
Discard
Best Answer

So what is your issue, you should write a docker-compose file so you will have a signe instance of posgresql but some container will share volume. Do you have some issues?

version: '3.1'
services:
  web1:
    image: odoo:16.0
    depends_on:
      - db
    ports:
      - "8070:8069"
    volumes:
      - odoo-web-data/web1:/var/lib/odoo
      - ./config/web1:/etc/odoo
      - ./addons/web1:/mnt/extra-addons
    environment:
      - PASSWORD_FILE=/run/secrets/postgresql_password
    secrets:
      - postgresql_password
web2: image: odoo:16.0 depends_on: - db ports: - "8069:8069" volumes: - odoo-web-data/web2:/var/lib/odoo - ./config/web2:/etc/odoo - ./addons/web2:/mnt/extra-addons environment: - PASSWORD_FILE=/run/secrets/postgresql_password secrets: - postgresql_password db: image: postgres:15 environment: - POSTGRES_DB=postgres - POSTGRES_PASSWORD_FILE=/run/secrets/postgresql_password - POSTGRES_USER=odoo - PGDATA=/var/lib/postgresql/data/pgdata volumes: - odoo-db-data:/var/lib/postgresql/data/pgdata secrets: - postgresql_password volumes: odoo-web-data: odoo-db-data: secrets: postgresql_password: file: odoo_pg_pass


Avatar
Discard
Best Answer

Hi,

Please go through our below blogs to know idea about how to deploy odoo using Docker

How to Deploy Odoo 15 Using Docker

How to Install Odoo 16 in Docker?


Hope it helps

Avatar
Discard
Related Posts Replies Views Activity
2
Sep 23
7078
2
Aug 23
21546
1
Sep 22
2637
0
Feb 22
3237
0
Jul 20
2813