version: '3.8'

services:
  db:
    image: pgvector/pgvector:pg16
    environment:
      POSTGRES_USER: odoo
      POSTGRES_PASSWORD: odoo
      POSTGRES_DB: encoach
    volumes:
      - pgdata:/var/lib/postgresql/data
    ports:
      - "5432:5432"

  odoo:
    build: .
    depends_on:
      - db
    ports:
      - "8069:8069"
    volumes:
      - odoo-data:/var/lib/odoo
      - ./custom_addons:/opt/odoo/custom_addons
    environment:
      - HOST=db
      - USER=odoo
      - PASSWORD=odoo
    command: ["odoo", "--config=/etc/odoo/odoo.conf"]

volumes:
  pgdata:
  odoo-data:
