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
|
||||
|
||||
# Install Poetry
|
||||
# RUN apt-get update && apt-get install -y curl
|
||||
# RUN curl -sSL https://install.python-poetry.org | python3 -
|
||||
RUN apt-get update && apt-get install -y curl
|
||||
RUN curl -sSL https://install.python-poetry.org | python3 -
|
||||
# # 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 poetry.lock pyproject.toml ./
|
||||
COPY poetry.lock pyproject.toml ./
|
||||
# Copy the rest of the application codes
|
||||
COPY ./ ./
|
||||
|
||||
# Install dependencies
|
||||
RUN pip install -e .
|
||||
RUN poetry config virtualenvs.create false && poetry install --no-interaction --no-ansi
|
||||
|
||||
|
||||
WORKDIR /app/langflow/backend
|
||||
|
||||
CMD ["uvicorn", "langflow_backend.main:app", "--host", "127.0.0.1", "--port", "5003", "--reload"]
|
||||
CMD ["uvicorn", "langflow_backend.main:app", "--host", "0.0.0.0", "--port", "5003", "--reload"]
|
||||
|
|
@ -9,13 +9,17 @@ services:
|
|||
- "5003:5003"
|
||||
volumes:
|
||||
- ./:/app
|
||||
platform: linux/amd64
|
||||
command: bash -c "uvicorn langflow_backend.main:app --host 0.0.0.0 --port 5003 --reload"
|
||||
|
||||
frontend:
|
||||
build: ./langflow/frontend
|
||||
build:
|
||||
context: ./langflow/frontend
|
||||
dockerfile: ./dev.Dockerfile
|
||||
ports:
|
||||
- "3000:3000"
|
||||
volumes:
|
||||
- ./langflow/frontend:/app
|
||||
# Set process.env.BACKEND to the backend service
|
||||
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