Spaces:
Sleeping
Sleeping
Upload 2 files
Browse files- Dockerfile +26 -0
- docker.env +4 -0
Dockerfile
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use the latest version of langflow
|
| 2 |
+
FROM langflowai/langflow:latest
|
| 3 |
+
|
| 4 |
+
# Create accessible folders and set the working directory in the container
|
| 5 |
+
RUN mkdir /app/flows
|
| 6 |
+
RUN mkdir /app/langflow-config-dir
|
| 7 |
+
WORKDIR /app
|
| 8 |
+
|
| 9 |
+
# Copy the flows, optional components, and langflow-config-dir folders to the container
|
| 10 |
+
COPY flows /app/flows
|
| 11 |
+
COPY components /app/components
|
| 12 |
+
COPY langflow-config-dir /app/langflow-config-dir
|
| 13 |
+
|
| 14 |
+
# copy docker.env file
|
| 15 |
+
COPY docker.env /app/.env
|
| 16 |
+
|
| 17 |
+
# Set environment variables
|
| 18 |
+
ENV PYTHONPATH=/app
|
| 19 |
+
ENV LANGFLOW_LOAD_FLOWS_PATH=/app/flows
|
| 20 |
+
ENV LANGFLOW_CONFIG_DIR=/app/langflow-config-dir
|
| 21 |
+
ENV LANGFLOW_COMPONENTS_PATH=/app/components
|
| 22 |
+
ENV LANGFLOW_LOG_ENV=container
|
| 23 |
+
|
| 24 |
+
# Command to run the server
|
| 25 |
+
EXPOSE 7860
|
| 26 |
+
CMD ["langflow", "run", "--backend-only", "--env-file","/app/.env","--host", "0.0.0.0", "--port", "7860"]
|
docker.env
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
LANGFLOW_AUTO_LOGIN=true
|
| 2 |
+
LANGFLOW_SAVE_DB_IN_CONFIG_DIR=true
|
| 3 |
+
LANGFLOW_BASE_URL=http://0.0.0.0:7860
|
| 4 |
+
OPENAI_API_KEY=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
|