-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
52 lines (49 loc) · 1.71 KB
/
Copy pathdocker-compose.yml
File metadata and controls
52 lines (49 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Reproducible Odoo development stack — Odoo 18 + PostgreSQL 16.
# Bring up with `make up` (recommended) or `docker compose up -d`.
# All tunables live in .env (copy from .env.example). No secrets are committed.
services:
db:
image: postgres:16
container_name: ${COMPOSE_PROJECT_NAME:-odoo-dev}-db
environment:
# Odoo connects as this user; the postgres image makes it a superuser,
# which Odoo needs in order to CREATE DATABASE on demand.
POSTGRES_USER: ${POSTGRES_USER:-odoo}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-odoo}
# Keep a default maintenance DB; Odoo creates its own app databases.
POSTGRES_DB: postgres
PGDATA: /var/lib/postgresql/data/pgdata
volumes:
- db-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-odoo} -d postgres"]
interval: 5s
timeout: 5s
retries: 12
restart: unless-stopped
odoo:
image: odoo:18.0
container_name: ${COMPOSE_PROJECT_NAME:-odoo-dev}-odoo
depends_on:
db:
condition: service_healthy
ports:
# Web / JSON-RPC / XML-RPC
- "${ODOO_PORT:-8069}:8069"
# gevent worker (websocket / live chat / longpolling)
- "${ODOO_GEVENT_PORT:-8072}:8072"
environment:
# The official Odoo entrypoint reads these to build the DB connection
# arguments (only used when odoo.conf does not set db_host/user/...).
HOST: db
PORT: 5432
USER: ${POSTGRES_USER:-odoo}
PASSWORD: ${POSTGRES_PASSWORD:-odoo}
volumes:
- odoo-web-data:/var/lib/odoo
- ./config/odoo.conf:/etc/odoo/odoo.conf:ro
- ./addons:/mnt/extra-addons
restart: unless-stopped
volumes:
db-data:
odoo-web-data: