Closed jefoy closed 1 year ago
I have bare-metal PostgreSQL server with ip = 192.168.33.12 that i want to use with Odoo.
And I want to run Odoo in Docker and have some kind of persistence.
So, I wan to connect dockered Odoo with my PostgreSQL server.
Here is my docker-compose.yml
version: '3.1' services: web: image: odoo:15.0 ports: - "8069:8069" volumes: - odoo-web-data:/var/lib/odoo - ./config:/etc/odoo - ./addons:/mnt/extra-addons volumes: odoo-web-data:
On Docker server I have created several directories:
~/odoo/config ~/odoo/addons
docker-compose.yml is in ~/odoo/.
Refers to this guide https://hub.docker.com/_/odoo/ i got odoo.conf in "~/odoo/config" that contains this:
[options] addons_path = /mnt/extra-addons data_dir = /var/lib/odoo admin_passwd = such_a_strong_password db_host = 192.168.33.12 db_port = 5432 db_user = odooadmin db_password = one_more_pass dbfilter = ^odoo-docker-host-0.*$ db_maxconn = 64
So, after running
docker-compose up -d
I can see in Docker logs this entry:
Database connection failure: could not translate host name "db" to address: Name or service not known
Please, help!
Thank you.
This config is good. The problem was in PostgreSQL network settings.
I have bare-metal PostgreSQL server with ip = 192.168.33.12 that i want to use with Odoo.
And I want to run Odoo in Docker and have some kind of persistence.
So, I wan to connect dockered Odoo with my PostgreSQL server.
Here is my docker-compose.yml
On Docker server I have created several directories:
docker-compose.yml is in ~/odoo/.
Refers to this guide https://hub.docker.com/_/odoo/ i got odoo.conf in "~/odoo/config" that contains this:
So, after running
docker-compose up -d
I can see in Docker logs this entry:
Database connection failure: could not translate host name "db" to address: Name or service not known
Please, help!
Thank you.