created odoo

This commit is contained in:
2026-05-26 00:44:38 -07:00
parent 0e4ae0df6a
commit cd9e739961
2 changed files with 86 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
# -------------------------------------------------------
# Odoo Docker Compose - Environment Variables
# Copy this file to .env and fill in your values
# -------------------------------------------------------
# --- PostgreSQL ---
# PostgreSQL image version tag
ODOO_DB_VERSION=15
# Host path for PostgreSQL data directory (bind mount)
ODOO_DB_PATH=/path/to/postgres/data
# Password for the 'odoo' PostgreSQL user
ODOO_DB_PASSWORD=change_me
# --- Odoo App ---
# Odoo image version tag (15+ required for /web/health endpoint)
ODOO_APP_VERSION=17
# Host port to expose the Odoo web interface on
ODOO_PORT=8069
# Host path for Odoo file store and sessions (bind mount)
ODOO_DATA_PATH=/path/to/odoo/data
# Host path for odoo.conf config file directory (bind mount)
ODOO_CONFIG_PATH=/path/to/odoo/config
# Host path for custom/extra addons (bind mount)
ODOO_ADDONS_PATH=/path/to/odoo/addons
# Timezone for the Odoo container (IANA format)
ODOO_TZ=America/Los_Angeles
+51
View File
@@ -0,0 +1,51 @@
services:
db:
image: postgres:${ODOO_DB_VERSION:-15}
container_name: odoo-db
volumes:
- ${ODOO_DB_PATH}:/var/lib/postgresql/data
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=odoo
- POSTGRES_PASSWORD=${ODOO_DB_PASSWORD:-odoo_db_password}
healthcheck:
test: ["CMD", "pg_isready", "-U", "odoo"]
interval: 5s
timeout: 5s
retries: 5
start_period: 10s
deploy:
resources:
limits:
memory: 512m
restart: unless-stopped
app:
image: odoo:${ODOO_APP_VERSION:-17}
container_name: odoo-app
depends_on:
db:
condition: service_healthy
ports:
- ${ODOO_PORT:-8069}:8069
volumes:
- ${ODOO_DATA_PATH}:/var/lib/odoo
- ${ODOO_CONFIG_PATH}:/etc/odoo
- ${ODOO_ADDONS_PATH}:/mnt/extra-addons
environment:
- TZ=${ODOO_TZ:-America/Los_Angeles}
- HOST=db
- PORT=5432
- USER=odoo
- PASSWORD=${ODOO_DB_PASSWORD:-odoo_db_password}
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8069/web/health"]
interval: 30s
timeout: 5s
retries: 3
start_period: 40s
deploy:
resources:
limits:
memory: 512m
restart: unless-stopped