Skip to content

Commit

Permalink
update docker files
Browse files Browse the repository at this point in the history
  • Loading branch information
ogabrielluiz committed Mar 15, 2023
1 parent a7fff38 commit 978bbd1
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
19 changes: 10 additions & 9 deletions dev.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 pip install -e .

# install dependencies
RUN poetry config virtualenvs.create false && poetry install --no-interaction --no-ansi

WORKDIR /app/langflow/backend

CMD ["uvicorn", "langflow.cli:app", "--host", "0.0.0.0", "--port", "5003"]
CMD ["uvicorn", "langflow_backend.main:app", "--host", "127.0.0.1", "--port", "5003", "--reload"]
5 changes: 3 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ services:
- "5003:5003"
volumes:
- ./:/app
environment:
- PYTHONPATH=/langflow # add this line to set PYTHONPATH

frontend:
build: ./langflow/frontend
ports:
- "3000:3000"
volumes:
- ./langflow/frontend:/app
# Set process.env.BACKEND to the backend service
environment:
- BACKEND=http://backend:5003
6 changes: 5 additions & 1 deletion langflow/frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 978bbd1

Please sign in to comment.