build: update docker for dev environment (#3551)

* build: update dockerfile for dev environment

* chore: add script to centralize docker commands

* build: create docker-compose.yml for services

* chore: add makefile target for docker-compose
This commit is contained in:
Ítalo Johnny 2024-08-26 19:05:08 -03:00 committed by GitHub
commit 6cdc915460
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 71 additions and 13 deletions

View file

@ -1,18 +1,22 @@
FROM python:3.10-slim
FROM python:3.12-bookworm
ENV TZ=UTC
WORKDIR /app
# Install Poetry
RUN apt-get update && apt-get install gcc g++ curl build-essential postgresql-server-dev-all -y
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 ./ ./
RUN apt update -y
RUN apt install \
build-essential \
curl \
npm \
-y
# Install dependencies
RUN poetry config virtualenvs.create false && poetry install --no-interaction --no-ansi
COPY . /app
CMD ["uvicorn", "--factory", "langflow.main:create_app", "--host", "0.0.0.0", "--port", "7860", "--reload", "--log-level", "debug", "--loop", "asyncio"]
RUN pip install poetry
RUN poetry config virtualenvs.create false
RUN poetry install --no-interaction --no-ansi
EXPOSE 7860
EXPOSE 3000
CMD ["./docker/dev.start.sh"]