parent
978bbd1071
commit
03430c7944
3 changed files with 19 additions and 12 deletions
|
|
@ -1,21 +1,18 @@
|
||||||
FROM tiangolo/uvicorn-gunicorn-fastapi:python3.10
|
FROM python:3.10-slim
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Install Poetry
|
# Install Poetry
|
||||||
# RUN apt-get update && apt-get install -y curl
|
RUN apt-get update && apt-get install -y curl
|
||||||
# RUN curl -sSL https://install.python-poetry.org | python3 -
|
RUN curl -sSL https://install.python-poetry.org | python3 -
|
||||||
# # Add Poetry to PATH
|
# # Add Poetry to PATH
|
||||||
# ENV PATH="${PATH}:/root/.local/bin"
|
ENV PATH="${PATH}:/root/.local/bin"
|
||||||
# # Copy the pyproject.toml and poetry.lock files
|
# # Copy the pyproject.toml and poetry.lock files
|
||||||
# COPY poetry.lock pyproject.toml ./
|
COPY poetry.lock pyproject.toml ./
|
||||||
# Copy the rest of the application codes
|
# Copy the rest of the application codes
|
||||||
COPY ./ ./
|
COPY ./ ./
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
RUN pip install -e .
|
RUN poetry config virtualenvs.create false && poetry install --no-interaction --no-ansi
|
||||||
|
|
||||||
|
CMD ["uvicorn", "langflow_backend.main:app", "--host", "0.0.0.0", "--port", "5003", "--reload"]
|
||||||
WORKDIR /app/langflow/backend
|
|
||||||
|
|
||||||
CMD ["uvicorn", "langflow_backend.main:app", "--host", "127.0.0.1", "--port", "5003", "--reload"]
|
|
||||||
|
|
@ -9,13 +9,17 @@ services:
|
||||||
- "5003:5003"
|
- "5003:5003"
|
||||||
volumes:
|
volumes:
|
||||||
- ./:/app
|
- ./:/app
|
||||||
|
platform: linux/amd64
|
||||||
|
command: bash -c "uvicorn langflow_backend.main:app --host 0.0.0.0 --port 5003 --reload"
|
||||||
|
|
||||||
frontend:
|
frontend:
|
||||||
build: ./langflow/frontend
|
build:
|
||||||
|
context: ./langflow/frontend
|
||||||
|
dockerfile: ./dev.Dockerfile
|
||||||
ports:
|
ports:
|
||||||
- "3000:3000"
|
- "3000:3000"
|
||||||
volumes:
|
volumes:
|
||||||
- ./langflow/frontend:/app
|
- ./langflow/frontend:/app
|
||||||
# Set process.env.BACKEND to the backend service
|
# Set process.env.BACKEND to the backend service
|
||||||
environment:
|
environment:
|
||||||
- BACKEND=http://backend:5003
|
- BACKEND="http://backend:5003"
|
||||||
|
|
|
||||||
6
langflow/frontend/dev.Dockerfile
Normal file
6
langflow/frontend/dev.Dockerfile
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
FROM node:14-alpine as frontend_build
|
||||||
|
ARG BACKEND
|
||||||
|
WORKDIR /app
|
||||||
|
COPY . /app
|
||||||
|
RUN npm install
|
||||||
|
CMD ["npm", "start"]
|
||||||
Loading…
Add table
Add a link
Reference in a new issue