Add Dockerfile to pre-bake Python ML dependencies into backend image
Extends odoo:19.0 with all requirements from new_project/requirements.txt (openai, torch, sentence-transformers, faiss-cpu, etc.) so they are baked into the image at build time — no more manual pip installs needed. Updates docker-compose.yml to use build: . and image: encoach-backend:latest. Made-with: Cursor
This commit is contained in:
9
Dockerfile
Normal file
9
Dockerfile
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
FROM odoo:19.0
|
||||||
|
|
||||||
|
USER root
|
||||||
|
|
||||||
|
# Install all Python dependencies required by EnCoach custom addons
|
||||||
|
COPY new_project/requirements.txt /tmp/requirements.txt
|
||||||
|
RUN pip install -r /tmp/requirements.txt --break-system-packages --no-warn-script-location
|
||||||
|
|
||||||
|
USER odoo
|
||||||
@@ -1,10 +1,12 @@
|
|||||||
services:
|
services:
|
||||||
db:
|
db:
|
||||||
image: postgres:16
|
image: postgres:16
|
||||||
|
container_name: backend-v2-db
|
||||||
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_USER: odoo
|
POSTGRES_USER: odoo
|
||||||
POSTGRES_PASSWORD: odoo
|
POSTGRES_PASSWORD: odoo
|
||||||
POSTGRES_DB: postgres
|
POSTGRES_DB: encoach_v2
|
||||||
volumes:
|
volumes:
|
||||||
- odoo-db-data:/var/lib/postgresql/data
|
- odoo-db-data:/var/lib/postgresql/data
|
||||||
healthcheck:
|
healthcheck:
|
||||||
@@ -14,18 +16,21 @@ services:
|
|||||||
retries: 5
|
retries: 5
|
||||||
|
|
||||||
odoo:
|
odoo:
|
||||||
image: odoo:19.0
|
build: .
|
||||||
|
image: encoach-backend:latest
|
||||||
|
container_name: backend-v2-odoo
|
||||||
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
db:
|
db:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
ports:
|
ports:
|
||||||
- "8069:8069"
|
- "8069:8069"
|
||||||
environment:
|
|
||||||
HOST: db
|
|
||||||
USER: odoo
|
|
||||||
PASSWORD: odoo
|
|
||||||
volumes:
|
volumes:
|
||||||
- odoo-web-data:/var/lib/odoo
|
- odoo-web-data:/var/lib/odoo
|
||||||
|
- ./odoo-docker.conf:/etc/odoo/odoo.conf:ro
|
||||||
|
- ./new_project/custom_addons:/mnt/custom_addons:ro
|
||||||
|
- ./new_project/enterprise-19:/mnt/enterprise:ro
|
||||||
|
- ./new_project/openeducat_erp-19.0:/mnt/openeducat:ro
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
odoo-db-data:
|
odoo-db-data:
|
||||||
|
|||||||
Reference in New Issue
Block a user