-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2eca4d9
commit c84decb
Showing
4 changed files
with
69 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,23 @@ | ||
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 \ | ||
postgresql-server-dev-all \ | ||
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 psycopg2-binary | ||
RUN poetry config virtualenvs.create false | ||
RUN poetry install --no-interaction --no-ansi | ||
|
||
EXPOSE 7860 | ||
EXPOSE 3000 | ||
|
||
CMD ["./docker/dev.start.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
networks: | ||
dev-langflow: | ||
|
||
services: | ||
langflow: | ||
build: | ||
context: .. | ||
dockerfile: docker/dev.Dockerfile | ||
image: dev-langflow | ||
container_name: dev-langflow | ||
restart: always | ||
ports: | ||
- "7860:7860" | ||
- "3000:3000" | ||
environment: | ||
- PYTHONDONTWRITEBYTECODE=1 | ||
- LANGFLOW_DATABASE_URL=postgresql://langflow:langflow@postgres:5432/langflow | ||
- LANGFLOW_SUPERUSER=langflow | ||
- LANGFLOW_SUPERUSER_PASSWORD=langflow | ||
- LANGFLOW_CONFIG_DIR=/var/lib/langflow | ||
env_file: | ||
- ../.env | ||
volumes: | ||
- ../:/app | ||
depends_on: | ||
- postgres # Dependência no seu banco de dados existente | ||
networks: | ||
- dev-langflow | ||
|
||
|
||
postgres: | ||
container_name: postgres | ||
image: pgvector/pgvector:pg16 | ||
environment: | ||
POSTGRES_USER: langflow | ||
POSTGRES_PASSWORD: langflow | ||
POSTGRES_DB: langflow | ||
ports: | ||
- "5432:5432" | ||
networks: | ||
- dev-langflow | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
|
||
cd src/frontend && npm run dev:docker & | ||
make backend |