From cd9e7399611856ee9a362ad3a56e54d44026d63a Mon Sep 17 00:00:00 2001 From: Derek Cooper Date: Tue, 26 May 2026 00:44:38 -0700 Subject: [PATCH] created odoo --- Odoo/.env.example | 35 ++++++++++++++++++++++++ Odoo/docker-compose-bind.yaml | 51 +++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100644 Odoo/.env.example create mode 100644 Odoo/docker-compose-bind.yaml diff --git a/Odoo/.env.example b/Odoo/.env.example new file mode 100644 index 0000000..061ff6e --- /dev/null +++ b/Odoo/.env.example @@ -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 diff --git a/Odoo/docker-compose-bind.yaml b/Odoo/docker-compose-bind.yaml new file mode 100644 index 0000000..952fe84 --- /dev/null +++ b/Odoo/docker-compose-bind.yaml @@ -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