Spaces:
Build error
Build error
Update Dockerfile
Browse files1234567898 unmodified lines18192021222324252627282930313233343536373839# Dockerfile for LangFlow with PostgreSQL# Use an official Python runtime as a parent imageFROM python:3.10-slim# Set environment variables to minimize Docker image sizeENV PYTHONDONTWRITEBYTECODE=1 \PYTHONUNBUFFERED=1 \LANG=C.UTF-8 \8 unmodified lines&& apt-get clean \&& rm -rf /var/lib/apt/lists/*# Upgrade pip and install PoetryRUN python -m pip install --upgrade pip \&& pip install --no-cache-dir poetry# Copy project filesCOPY . /app# Install dependencies using PoetryRUN poetry config virtualenvs.create false \&& poetry install --no-interaction --no-ansi# Expose application portEXPOSE 7860# Set environment variable for PostgreSQLENV DATABASE_URL=postgresql+psycopg2://langflow_user:langflow_password@your-cloud-postgres-url:5432/langflow_db# Set the entrypoint commandCMD ["poetry", "run", "langflow", "--host", "0.0.0.0", "--port", "7860"]12345678 unmodified lines161718192021222324252627282930313233343536# Use an official Python runtime as a parent imageFROM python:3.10-slim# Set environment variablesENV PYTHONDONTWRITEBYTECODE=1 \PYTHONUNBUFFERED=1 \LANG=C.UTF-8 \8 unmodified lines&& apt-get clean \&& rm -rf /var/lib/apt/lists/*# Install Poetry (if used) or pipRUN pip install --no-cache-dir poetry# Copy project filesCOPY . /app# Install dependencies (use Poetry or pip based on your setup)RUN poetry config virtualenvs.create false \&& poetry install --no-interaction --no-ansi# Expose application port (Hugging Face Spaces expects port 7860)EXPOSE 7860# Set environment variable for PostgreSQLENV DATABASE_URL=postgresql+psycopg2://langflow_user:langflow_password@your-cloud-postgres-url:5432/langflow_db# Run LangFlow applicationCMD ["poetry", "run", "langflow", "--host", "0.0.0.0", "--port", "7860"]
Dockerfile+6-9