47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
services:
|
|
db:
|
|
image: postgres:16
|
|
container_name: odoo-erp-db
|
|
restart: unless-stopped
|
|
env_file: .env
|
|
environment:
|
|
- POSTGRES_USER=${POSTGRES_USER:-odoo}
|
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
|
- POSTGRES_DB=${POSTGRES_DB:-postgres}
|
|
volumes:
|
|
- erp_pgdata:/var/lib/postgresql/data
|
|
ports:
|
|
- "5432:5432"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-odoo} -d ${POSTGRES_DB:-postgres}"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 10
|
|
|
|
odoo:
|
|
build: .
|
|
container_name: odoo-erp
|
|
restart: unless-stopped
|
|
env_file: .env
|
|
environment:
|
|
- HOST=db
|
|
- PORT=5432
|
|
- USER=${POSTGRES_USER:-odoo}
|
|
- PASSWORD=${POSTGRES_PASSWORD}
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
ports:
|
|
- "18070:8069"
|
|
volumes:
|
|
- erp_webdata:/var/lib/odoo
|
|
- ./config/odoo18.conf:/etc/odoo/odoo.conf
|
|
- ./odoo18:/opt/odoo
|
|
- ./custom_addons:/mnt/extra-addons
|
|
- ./enterprise:/mnt/enterprise
|
|
command: ["odoo", "-c", "/etc/odoo/odoo.conf"]
|
|
|
|
volumes:
|
|
erp_pgdata:
|
|
erp_webdata:
|