services:
  db:
    image: postgres:17.1-alpine3.20
    restart: unless-stopped
    command: >
      -c max_wal_size=4GB
    env_file:
      dev.env
    # ports:
    #   - 5433:5432
    volumes:
      - postgres_17_odoo_data:/var/lib/postgresql/data/

  odoo:
    image: odoo-dev:18
    restart: unless-stopped
    env_file:
      dev.env
    environment:
      - ARGS=${ARGS}
    # ports:
    #   - 5678:5678
    #   - 8069:8069
    volumes:
      - /home/sysop/odoo18/:/opt/odoo/
      - /home/sysop/odoo18/customaddons/${CUSTOMADDONS_DIR}/odoo-dev.conf:/etc/odoo.conf
      - odoo_18_filestore:/root/.local/share/Odoo/
    depends_on:
      - db
    labels:
      - logging=promtail
      - logging_jobname=containerlogs

  nginx:
    image: nginx:1.27.2-alpine3.20-slim
    restart: unless-stopped
    ports:
      - 3080:80
    volumes:
      - /home/sysop/odoo18/customaddons/${CUSTOMADDONS_DIR}/nginx.conf:/etc/nginx/conf.d/default.conf
    depends_on:
      - odoo

volumes:
  postgres_17_odoo_data:
    name: postgres_17_odoo_data
  odoo_18_filestore:
    name: odoo_18_filestore
