LangFlowDocker / Dockerfile
javear's picture
Update Dockerfile
e3e4a2b verified
raw
history blame contribute delete
739 Bytes
# Use the official Python image as a base
FROM python:3.9
# Set environment variables for LangFlow
ENV LANGFLOW_DATABASE_URL=postgres://avnadmin:AVNS_GqgQl5crS6BcPDzp3jC@pg-lentera-budgetcontrol.e.aivencloud.com:24559/defaultdb?sslmode=require
ENV LANGFLOW_CONFIG_DIR=/var/lib/langflow
# Create a user to run the application
RUN useradd -m -u 1000 user
# Set the working directory
WORKDIR /app
# Copy requirements file and install dependencies
COPY --chown=user ./requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt
# Copy the rest of the application code (if any)
COPY --chown=user . /app
# Switch to the non-root user
USER user
# Command to run LangFlow directly
CMD ["langflow", "run"]