feat: adding host param and docker example for deployment
This commit is contained in:
parent
03430c7944
commit
f798b7db19
3 changed files with 20 additions and 2 deletions
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(
|
def serve(
|
||||||
|
host: str = "127.0.0.1",
|
||||||
workers: int = 1,
|
workers: int = 1,
|
||||||
timeout: int = 60,
|
timeout: int = 60,
|
||||||
):
|
):
|
||||||
|
|
@ -27,8 +28,6 @@ def serve(
|
||||||
StaticFiles(directory=static_files_dir, html=True),
|
StaticFiles(directory=static_files_dir, html=True),
|
||||||
name="static",
|
name="static",
|
||||||
)
|
)
|
||||||
|
|
||||||
host = "127.0.0.1"
|
|
||||||
port = 5003
|
port = 5003
|
||||||
options = {
|
options = {
|
||||||
"bind": f"{host}:{port}",
|
"bind": f"{host}:{port}",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue