diff --git a/dev.Dockerfile b/dev.Dockerfile index dbe066f37..508a4bafd 100644 --- a/dev.Dockerfile +++ b/dev.Dockerfile @@ -3,18 +3,19 @@ FROM tiangolo/uvicorn-gunicorn-fastapi:python3.10 WORKDIR /app # Install Poetry -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" -# Copy the pyproject.toml and poetry.lock files -COPY poetry.lock pyproject.toml ./ +# 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" +# # Copy the pyproject.toml and poetry.lock files +# COPY poetry.lock pyproject.toml ./ # Copy the rest of the application codes COPY ./ ./ - -# install dependencies -RUN poetry config virtualenvs.create false && poetry install --no-interaction --no-ansi +# Install dependencies +RUN pip install -e . -CMD ["uvicorn", "langflow.cli:app", "--host", "0.0.0.0", "--port", "5003"] +WORKDIR /app/langflow/backend + +CMD ["uvicorn", "langflow_backend.main:app", "--host", "127.0.0.1", "--port", "5003", "--reload"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index c01f16c26..62905c475 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,8 +9,6 @@ services: - "5003:5003" volumes: - ./:/app - environment: - - PYTHONPATH=/langflow # add this line to set PYTHONPATH frontend: build: ./langflow/frontend @@ -18,3 +16,6 @@ services: - "3000:3000" volumes: - ./langflow/frontend:/app + # Set process.env.BACKEND to the backend service + environment: + - BACKEND=http://backend:5003 diff --git a/langflow/frontend/Dockerfile b/langflow/frontend/Dockerfile index c20d3f0f4..5caca7fb0 100644 --- a/langflow/frontend/Dockerfile +++ b/langflow/frontend/Dockerfile @@ -1,4 +1,8 @@ -FROM logspace/frontend_build as frontend_build +FROM node:14-alpine as frontend_build +WORKDIR /app +COPY . /app +RUN npm install +RUN npm run build FROM nginx COPY --from=frontend_build /app/build/ /usr/share/nginx/html