docker icon indicating copy to clipboard operation
docker copied to clipboard

where do I set the database name?

Open f1-outsourcing opened this issue 5 years ago • 4 comments

where do I set the database name?

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

f1-outsourcing avatar Nov 01 '20 12:11 f1-outsourcing

From the compose section:

    image: postgres:10
    environment:
      - POSTGRES_DB=postgres

Or try --db-name from command line.

lecoqlibre avatar Mar 01 '21 14:03 lecoqlibre

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.

f1-outsourcing avatar Mar 03 '21 14:03 f1-outsourcing

He was refering to postgres, Odoo does not offer a simple setting for that. For a possible solution/hint see: https://github.com/odoo/docker/issues/394

n00b42 avatar Oct 20 '22 14:10 n00b42

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.

lathama avatar Apr 11 '24 17:04 lathama