Skip to content

Instantly share code, notes, and snippets.

@rajeshpachaikani
Last active November 9, 2025 09:41
Show Gist options
  • Select an option

  • Save rajeshpachaikani/fd96818391ca1be858962088c7bbba13 to your computer and use it in GitHub Desktop.

Select an option

Save rajeshpachaikani/fd96818391ca1be858962088c7bbba13 to your computer and use it in GitHub Desktop.

Revisions

  1. rajeshpachaikani revised this gist Jan 22, 2025. 1 changed file with 6 additions and 2 deletions.
    8 changes: 6 additions & 2 deletions docker-compose.yaml
    Original file line number Diff line number Diff line change
    @@ -14,11 +14,14 @@
    version: '3.1'
    services:
    web:
    image: odoo:18.0
    image: odoo:latest
    depends_on:
    - db
    restart: always
    ports:
    - "8069:8069"
    - "8072:8072"

    volumes:
    - odoo-web-data:/var/lib/odoo
    - ./config:/etc/odoo
    @@ -28,12 +31,13 @@ services:
    secrets:
    - postgresql_password
    db:
    image: postgres:15
    image: postgres:latest
    environment:
    - POSTGRES_DB=postgres
    - POSTGRES_PASSWORD_FILE=/run/secrets/postgresql_password
    - POSTGRES_USER=odoo
    - PGDATA=/var/lib/postgresql/data/pgdata
    restart: always
    volumes:
    - odoo-db-data:/var/lib/postgresql/data/pgdata
    secrets:
  2. rajeshpachaikani created this gist Jan 22, 2025.
    47 changes: 47 additions & 0 deletions docker-compose.yaml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,47 @@
    #Odoo-docker-directory
    #├── addons
    #├── config
    #│   └── odoo.conf
    #├── docker-compose.yaml
    #├── odoo_pg_pass
    #└── sessions

    # Create a config file inside the config directory with the following content
    # [options]
    # addons_path = /mnt/extra-addons

    # docker-compose.yaml
    version: '3.1'
    services:
    web:
    image: odoo:18.0
    depends_on:
    - db
    ports:
    - "8069:8069"
    volumes:
    - odoo-web-data:/var/lib/odoo
    - ./config:/etc/odoo
    - ./addons:/mnt/extra-addons
    environment:
    - PASSWORD_FILE=/run/secrets/postgresql_password
    secrets:
    - postgresql_password
    db:
    image: postgres:15
    environment:
    - POSTGRES_DB=postgres
    - POSTGRES_PASSWORD_FILE=/run/secrets/postgresql_password
    - POSTGRES_USER=odoo
    - PGDATA=/var/lib/postgresql/data/pgdata
    volumes:
    - odoo-db-data:/var/lib/postgresql/data/pgdata
    secrets:
    - postgresql_password
    volumes:
    odoo-web-data:
    odoo-db-data:
    # Create a file named odoo_pg_pass in the same directory and enter your database password for odoo
    secrets:
    postgresql_password:
    file: odoo_pg_pass