mirror of
https://github.com/langflow-ai/langflow.git
synced 2026-07-23 21:21:20 +08:00
feat: adding host param and docker example for deployment
This commit is contained in:
8
docker_example/Dockerfile
Normal file
8
docker_example/Dockerfile
Normal file
@ -0,0 +1,8 @@
|
||||
FROM python:3.11-slim
|
||||
|
||||
WORKDIR /app
|
||||
COPY ./ /app
|
||||
RUN pip install langflow
|
||||
|
||||
EXPOSE 5003
|
||||
CMD ["langflow", "--host", "0.0.0.0"]
|
||||
11
docker_example/docker-compose.yml
Normal file
11
docker_example/docker-compose.yml
Normal file
@ -0,0 +1,11 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
langflow:
|
||||
build:
|
||||
context: ./
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- "5003:5003"
|
||||
command: langflow --host 0.0.0.0
|
||||
platform: linux/amd64
|
||||
@ -15,6 +15,7 @@ def get_number_of_workers(workers=None):
|
||||
|
||||
|
||||
def serve(
|
||||
host: str = "127.0.0.1",
|
||||
workers: int = 1,
|
||||
timeout: int = 60,
|
||||
):
|
||||
@ -27,8 +28,6 @@ def serve(
|
||||
StaticFiles(directory=static_files_dir, html=True),
|
||||
name="static",
|
||||
)
|
||||
|
||||
host = "127.0.0.1"
|
||||
port = 5003
|
||||
options = {
|
||||
"bind": f"{host}:{port}",
|
||||
|
||||
Reference in New Issue
Block a user