update docker files
This commit is contained in:
parent
a7fff38fff
commit
978bbd1071
3 changed files with 19 additions and 13 deletions
|
|
@ -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"]
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue