From c27e3656dbd8c01bb373aa975f1c2f1f2bbe6dc2 Mon Sep 17 00:00:00 2001 From: Andrew Latham Date: Thu, 11 Apr 2024 10:13:09 -0600 Subject: [PATCH] [odoo] Update content.md with database name example Offer an example Docker Compose that will set the database name for Odoo. - https://github.com/odoo/docker/issues/394 - https://github.com/odoo/docker/issues/358 - https://github.com/odoo/docker/issues/331 Additional changes - Title case name Postgres - Correct indentation of prior example --- odoo/content.md | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/odoo/content.md b/odoo/content.md index aecb5a61b3a4..ac04d16a8662 100644 --- a/odoo/content.md +++ b/odoo/content.md @@ -120,7 +120,7 @@ services: - POSTGRES_USER=odoo ``` -If the default postgres credentials does not suit you, tweak the environment variables: +If the default Postgres credentials does not suit you, tweak the environment variables: ```yml version: '3.1' @@ -132,9 +132,33 @@ services: ports: - "8069:8069" environment: - - HOST=mydb - - USER=odoo - - PASSWORD=myodoo + - HOST=mydb + - USER=odoo + - PASSWORD=myodoo + mydb: + image: postgres:15 + environment: + - POSTGRES_DB=postgres + - POSTGRES_PASSWORD=myodoo + - POSTGRES_USER=odoo +``` + +Use a custom database name instead of `postgres` + +```yml +version: '3.1' +services: + web: + image: %%IMAGE%%:17.0 + depends_on: + - mydb + ports: + - "8069:8069" + environment: + - HOST=mydb + - USER=odoo + - PASSWORD=myodoo + command: odoo -d customdb mydb: image: postgres:15 environment: