From 7471d3104f4933fc17c28858036f0ee845d8c6ad 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 aecb5a61b3a4f..74ea7ae1a774e 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,9 @@ services: ports: - "8069:8069" environment: - - HOST=mydb - - USER=odoo - - PASSWORD=myodoo + - HOST=mydb + - USER=odoo + - PASSWORD=myodoo mydb: image: postgres:15 environment: @@ -143,6 +143,30 @@ services: - 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: + - POSTGRES_DB=customdb + - POSTGRES_PASSWORD=myodoo + - POSTGRES_USER=odoo +``` + Here's a last example showing you how to - mount custom addons located in `./addons`