Skip to content

Commit

Permalink
[odoo] Update content.md with database name example
Browse files Browse the repository at this point in the history
Offer an example Docker Compose that will set the database name for Odoo.

- odoo/docker#394
- odoo/docker#358
- odoo/docker#331
  • Loading branch information
lathama committed Apr 11, 2024
1 parent a7f4998 commit 34feaf9
Showing 1 changed file with 29 additions and 4 deletions.
33 changes: 29 additions & 4 deletions odoo/content.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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:
Expand All @@ -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`
Expand Down

0 comments on commit 34feaf9

Please sign in to comment.