[30388f42] Infrastructure Hardening: Repaired CE/Connector DB schema, fixed frontend styling build, implemented robust echo shield in worker v2.1.1, and integrated Lead Engine into gateway.
This commit is contained in:
@@ -1,19 +1,31 @@
|
||||
# Use an official Python runtime as a parent image
|
||||
FROM python:3.9-slim
|
||||
# --- STAGE 1: Builder ---
|
||||
FROM python:3.11-slim AS builder
|
||||
|
||||
# Set the working directory in the container
|
||||
WORKDIR /app
|
||||
|
||||
# Copy the requirements file into the container at /app
|
||||
# Install system dependencies needed for building
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install dependencies into a local directory
|
||||
COPY requirements.txt .
|
||||
RUN pip install --user --no-cache-dir -r requirements.txt
|
||||
|
||||
# Install any needed packages specified in requirements.txt
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
# --- STAGE 2: Runtime ---
|
||||
FROM python:3.11-slim
|
||||
|
||||
# Copy the rest of the application's code from the host to the container at /app
|
||||
WORKDIR /app
|
||||
|
||||
# Copy only installed packages from builder
|
||||
COPY --from=builder /root/.local /root/.local
|
||||
# Update PATH to include the user-installed packages
|
||||
ENV PATH=/root/.local/bin:$PATH
|
||||
|
||||
# Copy application code
|
||||
COPY . .
|
||||
|
||||
# Expose port 8000 to the outside world
|
||||
# Expose port 8000
|
||||
EXPOSE 8000
|
||||
|
||||
# Command to run the application
|
||||
|
||||
Reference in New Issue
Block a user