feat: adding host param and docker example for deployment

This commit is contained in:
Gabriel Almeida 2023-03-15 16:09:34 -03:00
commit f798b7db19
3 changed files with 20 additions and 2 deletions

View 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"]

View 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

View file

@ -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}",