From 34feaf97d9444847e38bf931c0ae630399243eb8 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 --- odoo/content.md | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/odoo/content.md b/odoo/content.md index aecb5a61b3a4f..7342ee85bc532 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,31 @@ 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`