Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

where do I set the database name? #331

Open
f1-outsourcing opened this issue Nov 1, 2020 · 4 comments
Open

where do I set the database name? #331

f1-outsourcing opened this issue Nov 1, 2020 · 4 comments

Comments

@f1-outsourcing
Copy link

where do I set the database name?

missing on this page
https://hub.docker.com/_/odoo

@lecoqlibre
Copy link

From the compose section:

    image: postgres:10
    environment:
      - POSTGRES_DB=postgres

Or try --db-name from command line.

@f1-outsourcing
Copy link
Author

From the compose section:

    image: postgres:10
    environment:
      - POSTGRES_DB=postgres

Or try --db-name from command line.

If they updated/added this, they should also update the environment variable section on dockerhub.

@n00b42
Copy link

n00b42 commented Oct 20, 2022

He was refering to postgres, Odoo does not offer a simple setting for that.
For a possible solution/hint see: #394

lathama added a commit to lathama/docker_library_docs that referenced this issue Apr 11, 2024
Offer an example Docker Compose that will set the database name for Odoo.

- odoo/docker#394
- odoo/docker#358
- odoo/docker#331
lathama added a commit to lathama/docker_library_docs that referenced this issue Apr 11, 2024
Offer an example Docker Compose that will set the database name for Odoo.

- odoo/docker#394
- odoo/docker#358
- odoo/docker#331

Additional changes

- Title case name Postgres
- Correct indentation of prior example
lathama added a commit to lathama/docker_library_docs that referenced this issue Apr 11, 2024
Offer an example Docker Compose that will set the database name for Odoo.

- odoo/docker#394
- odoo/docker#358
- odoo/docker#331

Additional changes

- Title case name Postgres
- Correct indentation of prior example
@lathama
Copy link

lathama commented Apr 11, 2024

example

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=postgres
      - POSTGRES_PASSWORD=myodoo
      - POSTGRES_USER=odoo

note that POSTGRES_DB must be set to postgres and then Odoo will create the database and populate if needed.

if you are connecting to an existing database then it may not be needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants