Commit graph

42 commits

Author SHA1 Message Date
Cristhian Zanforlin Lousa
654154ebbe
refactor(docker): remove --extra deploy flag from uv sync commands (#8485)
🔧 (build_and_push_with_extras.Dockerfile): remove unnecessary uv sync command options to improve build efficiency and reduce redundancy

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-06-11 14:39:53 +00:00
Dexter192
9191773957
fix: Allow upload limit increase in kubernetes deployment (#7664)
* Add nginx body size upload limit config

* Add nginx body size upload limit config

* Rename env variable to match existing max upload

* Rename env variable to match existing max upload

* Add export of Max_file_size_upload variable

* Add unit to max body size

* Remove unit from default assignment

* Apply comments and move config to default nginx conf template

---------

Co-authored-by: daniel.kaestner <daniel.kaestner@cas.de>
Co-authored-by: Dexter192 <DanielKaestner@otlook.de>
2025-06-03 11:53:08 +00:00
Jordan Frazier
409146151c
build: add build for docker image with all optional deps (#7957)
* Add build for docker image with all optional deps

* Add to release workflows
2025-05-12 16:26:58 +00:00
Jordan Frazier
674cee0906
build: add event-delivery polling for cloud image (#7911)
Add event-delivery polling for cloud image
2025-05-05 21:28:17 -07:00
Yuqi Tang
34ad59533b
fix: Adding Node to Dockerfile (#7735)
adding node to dockerfile
2025-04-22 21:32:27 +00:00
Yashraj Dighe
6dccb22e38
Fix: add missing curl to dockerfile langflow-ai/langflow-helm-charts#40 (#6971)
* add missing curl and remove empty continuation line

* add missing curl

* Update docker/build_and_push.Dockerfile

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

* Update docker/build_and_push_base.Dockerfile

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-04-17 14:16:21 +00:00
jeevi cao
3fccfd75ed
feat: frontend docker nginx configuration add brower cache accelerated pages access (#7125)
* Update py_autofix.yml

* feat: frontend docker nginx  add brower cache accelerate page access

* Revert "Update py_autofix.yml"

This reverts commit 7aed45e98602f57c2d6d33532080bad30cf02507.

* revert py_autofix.yml

* Revert "Update py_autofix.yml"

This reverts commit 7aed45e98602f57c2d6d33532080bad30cf02507.

* add: remove blank line

* fix: update Nginx configuration to prevent caching for index.html

---------

Co-authored-by: tianzhipeng <tzpabc@gmail.com>
Co-authored-by: caojianwei-jk <caojianwei-jk@360shuke.com>
2025-04-10 17:57:41 +00:00
Cristhian Zanforlin Lousa
ee43c51297
fix: Add libpq-dev and gcc dependencies to backend Dockerfile (#7136)
* 🔧 (Dockerfile): update Dockerfile to install additional dependencies (libpq-dev, gcc) required for the application to run successfully

* add libpq5 to docker ffile nightly

* 🔧 (docker-compose.yml): add docker-compose configuration for langflow and postgres services
♻️ (add_column_access_type_to_flow.py): refactor to use uppercase for access type enum values for consistency
♻️ (model.py): refactor to use uppercase for access type enum values for consistency

* 🔧 (docker-compose.yml): remove docker-compose file as it is no longer needed for the project

---------

Co-authored-by: Ítalo Johnny <italojohnnydosanjos@gmail.com>
2025-03-18 18:50:59 +00:00
Jordan Frazier
c41eaf0071
build: add postgresql client library libpq5 (#6964)
Add postgresql client library libpq5
2025-03-07 21:44:05 +00:00
Gabriel Luiz Freitas Almeida
84aa1d63b3
fix: update sqlalchemy dependencies in pyproject.toml (#6854) 2025-02-26 19:27:19 -03:00
Jordan Frazier
400572342f
feat: add nvidia ingest component (#6333)
* initial

* cleanup

* [autofix.ci] apply automated fixes

* ruff

* add else

* update deps

* uv lock

* Make nv-ingest an optional dep

* revert change to validate

* rebase fixes

* [autofix.ci] apply automated fixes

* Update language

* add extra args to make target

* [autofix.ci] apply automated fixes

* update error language

* lockfile update

* rebase lockfile:

* [autofix.ci] apply automated fixes

* Adds nv-ingest by default to -ep docker image

* caps fixes

* update uv lock

* revert ruff upgrade

* ruff

* Fix lint

* [autofix.ci] apply automated fixes

* No code changes made.

* fix: update ruff configuration to ignore additional linting rule and allow built-in modules

* fix: update ruff command to ignore linting rule A005 during autofix

* fix: update Ruff check command to ignore linting rule A005

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-02-20 19:26:03 +00:00
Mattias Michaux
cdf85e55de
fix: add the git binary to the final step of the container images (#5863)
Add the git binary to the runtime images
2025-01-22 15:07:34 +00:00
Gabriel Luiz Freitas Almeida
8ea4405010
refactor: run upgrade in dockerfiles to update dependencies (#5508)
chore: Update Dockerfiles to use COPY instead of ADD run apt-get upgrade

- Replaced ADD commands with COPY for better clarity and consistency across Dockerfiles.
- Added apt-get upgrade and clean commands to reduce image size and ensure packages are up to date.
- Updated user creation commands to include necessary cleanup steps.
- Ensured all Dockerfiles follow a similar structure for maintainability.
2025-01-02 15:49:41 +00:00
Jordan Frazier
ba6f5183be
ci: update docker image configuration for secure deployments (#5259)
* changes required for openshift to work with read-only dirs
2024-12-13 22:38:55 +00:00
gitworkflows
267c08bc07
fix(Dockerfile): standardize casing for 'FROM' and 'AS' keywords (#5159)
- Updated the Dockerfile to use consistent uppercase casing for 'FROM' and 'AS'.
- Resolved 'FromAsCasing' warnings that were flagged during the Docker build.
- Improves readability and adheres to Dockerfile best practices.

This change ensures a cleaner build process with no warnings.
2024-12-09 04:47:59 -08:00
Ítalo Johnny
44a3e7643a
fix: adjust GitLoader to work in a hosted environment (#5040)
* fix: add git installation to dockerfile dependencies

* chore: make input optional
2024-12-04 14:58:31 +00:00
Jordan Frazier
3a1c0301cd
buid: reduce number of layers in runtime env for langflow-ep build (#4457)
Reduce number of layers in runtime env
2024-11-07 12:33:46 -08:00
Jordan Frazier
18d08413ce
build: add curl to ep image (#4456)
Add curl to ep image
2024-11-07 12:29:26 -08:00
Sebastián Estévez
c1097d2dde
chore: update dockerfiles and docker-build workflows to fix releases (#4317)
* bash -x

* bash verbose

* combine bash calls in uv run

* combined python script

* relative dir

* pass args correctly

* pass args correctly

* function name

* fix arg order

* merge base and main

* remove nightly -ep docker image for now

* set up uv in the get-version job in docker-build.yml

* v prefix for version in build job

* use inputs.nightly_tag_main for checkout actions

* mount root project metadata for base build

* fix comment

* continued dockerfile fixes for workspaces setup

* fix path

* ruff check fix
2024-10-31 11:16:26 +00:00
Gabriel Luiz Freitas Almeida
0fd3d93b1d
chore: update devcontainer configuration and Dockerfile (#4298)
* Add Dockerfile for devcontainer with Rust and UV setup

* Update devcontainer configuration to use Dockerfile and enhance features

- Switch from using a pre-built image to building from a Dockerfile.
- Replace Poetry feature with Hadolint for linting Dockerfiles.
- Add new VSCode extensions: Ruff, Autodocstring, Indent Rainbow, and Hadolint.
- Set default terminal profile to zsh in VSCode settings.
- Add a postStartCommand to initialize the environment.
- Change remote user to 'vscode'.

* Update test command in VSCode tasks to 'make unit_tests'

* chore: remove unnecessary comment

---------

Co-authored-by: italojohnny <italojohnnydosanjos@gmail.com>
2024-10-30 11:11:16 +00:00
Jordan Frazier
eedfe43e69
build: dockerfile with entrypoint (#4062)
Adds a dockerfile with an entrypoint for use with Datastax Langflow
2024-10-16 20:18:39 -07:00
Jordan Frazier
d223eccdcc
build: add readme to dockerfile (#4105)
Add readme to dockerfile
2024-10-10 16:01:14 -07:00
Jordan Frazier
e19d90bd6c
ci: fix releases with uv (#3971)
* Update scripts

* update the base dep in uv deps

* update nightly scripts

* Add uv creds for publish

* skip tests for now

* fix version

* only build the wheel

* try again

* add uv to python run

* [autofix.ci] apply automated fixes

* use uv cache

* more version fixe

* fixing versions

* fix base version

* Try no frozen?

* skip everything to try docker build

* tag

* frozen

* separate script for updating uv dep

* [autofix.ci] apply automated fixes

* hardcoded versions

* hardcoded versions

* add version to editable package

* build project before docker file runs

* try again

* fix uv patht o build

* don't know why this would mkae a difference

* debug statements

* debug statements

* debug statements

* change path to whl 🤷

* manually move the wheel...

* make dir

* try no sources

* add back tests

* refactor uv to action

* add uv action

* Update nightly build workflow to include uv lock files in version update commit

* Update lint-py workflow to use specific ref for setup-uv action

* Add checkout step to style-check-py GitHub Actions workflow

* Remove redundant GitHub ref syntax in lint-py.yml workflow

* Update lint-py.yml to use specific ref for setup-uv action

* Update action.yml: standardize quotes and remove redundant checkout step

* Add checkout step to GitHub Actions workflows for specific ref handling

- Introduced `actions/checkout@v4` step to multiple workflows to ensure code is checked out at a specific ref.
- Updated `.github/workflows/docker-build.yml`, `.github/workflows/release_nightly.yml`, `.github/workflows/lint-py.yml`, and `.github/workflows/style-check-py.yml` to include the new checkout step.
- Ensured credentials are persisted during the checkout process.

* Add checkout step to Python test workflow with specific ref

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2024-10-02 05:37:04 -07:00
Gabriel Luiz Freitas Almeida
43ad226ddb
chore: update docker images to use uv (#3916)
* fix dev dependencies

* fix dev dependencies

* update lock

* Add langchain-unstructured dependency to pyproject.toml

* Switch to uv-based Docker image and streamline build process

- Use `ghcr.io/astral-sh/uv:python3.12-bookworm-slim` as the base image
- Simplify environment variable setup and remove unnecessary ones
- Install project dependencies using `uv sync` with cache mounts
- Add and copy necessary files for the build process
- Update npm installation and frontend build steps
- Adjust entrypoint and runtime configurations
- Remove redundant user setup and streamline CMD execution

* Refactor Dockerfile to use multi-stage builds for optimized image size

- Introduce a builder stage to install dependencies and build the frontend.
- Use npm ci instead of npm install for more reliable builds.
- Copy built frontend assets to the final image.
- Transition to a runtime stage with a slimmer Python base image.
- Ensure the final image only contains necessary runtime dependencies.

* Switch base image to `ghcr.io/astral-sh/uv:python3.12-bookworm-slim` and update Dockerfile

- Replace `python:3.12.3-slim` with `ghcr.io/astral-sh/uv:python3.12-bookworm-slim` as the base image.
- Enable bytecode compilation and set link mode to copy.
- Update dependency installation process using `uv sync`.
- Simplify frontend build and copy process.
- Add OCI labels for image metadata.
- Update CMD to use `langflow-base` for running the application.

* Update Dockerfile to use uv base image and optimize dependency installation

- Switch base image to `ghcr.io/astral-sh/uv:python3.12-bookworm-slim`
- Combine apt-get commands and clean up to reduce image size
- Replace Poetry with uv for dependency management and caching

* Refactor Dockerfile to use multi-stage build for optimized image size

- Introduce a builder stage using `ghcr.io/astral-sh/uv:python3.12-bookworm-slim`
- Add a runtime stage using `python:3.12.3-slim`
- Copy the virtual environment from the builder stage to the runtime stage
- Remove the `uv` entrypoint to avoid invoking it by default

* Update Dockerfile: Fix indentation and remove redundant ENTRYPOINT reset

* ci: update release workflows to use uv (#3919)

* Update nightly build workflow to use 'uv' for dependency management and caching

- Replace Poetry with 'uv' for dependency installation and project setup
- Add steps to install 'uv' and set up caching for 'uv.lock'
- Modify Python setup to use version specified in 'pyproject.toml'
- Remove Node.js setup steps

* Update release workflow to use uv for dependency management

- Replace Poetry with uv for dependency installation and caching
- Update Python setup to use version specified in pyproject.toml
- Add steps to restore uv cache and install project dependencies using uv
- Adjust publish steps to maintain functionality with new setup

* Replace 'poetry publish' with 'uv publish' in Makefile for consistency

* Update nightly build workflow to use 'uv' for dependency management and caching

* Set up Node.js 20 in release_nightly workflow and update version verification logic

* Update Makefile to use `uv sync --frozen` for backend dependencies installation

* Update Makefile to pass arguments to 'uv build' and remove '--skip-existing' from publish commands

- Modified 'build_langflow' target to accept arguments.
- Removed '--skip-existing' from 'publish_base' and 'publish_base_testpypi' commands.
- Added TODO comments for updating test-pypi repository usage.

* Remove --skip-existing flag from uv publish commands and add TODO comments for test-pypi updates

* new lock

* Update CI workflow to remove version prefix and add build args

- Removed 'v' prefix from version extraction in nightly release workflow.
- Added '--no-sources' argument to the build command in the distribution step.

* Update CI workflow to use 'uv' for versioning and publishing

- Replace 'poetry' with 'uv' for version extraction in release checks

* Update CI workflow to use UV_PUBLISH_TOKEN for PyPI publishing

* Add verification step for 'langflow-nightly' name and version in CI workflow

- Corrected awk commands for extracting 'langflow-base' name and version.
- Added a new step to verify 'langflow-nightly' name and version against expected values.

* feat: Update dev.Dockerfile to use 'uv' for dependency management and caching

* update dockerfiles with --no-editable

---------

Co-authored-by: phact <estevezsebastian@gmail.com>
Co-authored-by: Jordan Frazier <jordan.frazier@datastax.com>
2024-09-30 22:49:25 +00:00
Ítalo Johnny
6cdc915460
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
2024-08-26 22:05:08 +00:00
Cristhian Zanforlin Lousa
a763f57af5
feat: add timeout handler on FE (#3537)
*  (frontend): Add TimeoutErrorComponent to handle timeout errors in API requests
🔧 (frontend): Add healthCheckTimeout state and setHealthCheckTimeout function to utilityStore for managing timeout errors in API requests

* 📝 (constants.ts): add constants for server health check intervals to improve code readability and maintainability
🐛 (use-get-health.ts): fix refetch interval value to use the newly added constant REFETCH_SERVER_HEALTH_INTERVAL for consistency and easier maintenance

* 📝 (api.tsx): Add utilityStore import to improve code organization
📝 (api.tsx): Add createNewError503 function to handle custom 503 errors
📝 (api.tsx): Add AxiosError import for type checking
📝 (api.tsx): Refactor error handling logic for authentication errors
📝 (use-get-health.ts): Add createNewError503 import for custom 503 errors
📝 (use-get-health.ts): Add AxiosError import for type checking
📝 (use-get-health.ts): Refactor error handling logic for server busy status
📝 (index.tsx): Add AxiosError import for type checking
📝 (index.tsx): Add useEffect and useState imports for state management
📝 (index.tsx): Refactor error handling logic for server status and retries
📝 (utilityStore.ts): Add retriesApiRequest state and setRetriesApiRequest function
📝 (axios-error-503.ts): Create function to generate custom 503 error responses
📝 (index.ts): Add retriesApiRequest state and setRetriesApiRequest function to UtilityStoreType

* 🔧 (utilityStore.ts): remove unused retriesApiRequest and setRetriesApiRequest functions to clean up code and improve maintainability
🔧 (index.ts): remove unused retriesApiRequest and setRetriesApiRequest types to keep type definitions consistent and up to date

*  (nginx.conf): add new health endpoint to proxy_pass requests to the backend server for health checks

*  (langflow): Add support for configuring the number of retries for the health check feature. This change introduces a new option `health_check_max_retries` that can be set via environment variable or command line argument to control the maximum number of retries for the health check process.

* check if value is none
2024-08-26 14:21:05 -07:00
Nicolò Boschi
8145d91f7d
fix: frontend image should forward /health_check to backend (#2887) 2024-07-23 15:08:43 +02:00
Ítalo Johnny
29e662848c
chore: simplify docker (#2526)
* chore: add docker command shortcuts to makefile

* chore: replaced entreypoint with cmd

* chore: remove enviroment variable
2024-07-04 11:14:52 -03:00
italojohnny
79774218d9 update dockerfile 2024-07-01 13:53:55 -03:00
Gabriel Luiz Freitas Almeida
7d8fefa562 Update dockerfiles and docker-build.yml (#2389)
* chore: Update docker-build.yml to disable pre-release by default

* chore: Update Dockerfiles to set LANGFLOW_HOST and LANGFLOW_PORT

The Dockerfiles have been updated to set the environment variables LANGFLOW_HOST and LANGFLOW_PORT. This ensures that the correct host and port are used when running the langflow application.

* 🔧 (build_and_push_backend.Dockerfile): remove unnecessary host and port configuration to simplify the Dockerfile and focus on backend-only functionality

* chore: Update LANGFLOW_CONFIG_DIR in docker-compose.yml

The LANGFLOW_CONFIG_DIR environment variable in docker-compose.yml has been updated to /app/langflow. This change ensures that the correct directory is used for storing logs, file storage, monitor data, and secret keys.
2024-07-01 13:53:39 -03:00
Nicolò Boschi
968ec28fbc
docker: force python version to 3.12.3 (#2148)
* docker: force python version to 3.12.3

* also fixes pydantic

* remove ci build - too slow

* use lock file for deps

* use poetry.lock

* use poetry.lock
2024-06-12 06:09:46 -07:00
Nicolò Boschi
9261bc0a6f
docker: add customizable port for frontend image (#2147) 2024-06-12 06:08:23 -07:00
Nicolò Boschi
1110494615
feat: multi arch docker images (#2123) 2024-06-11 10:12:31 +02:00
Nicolò Boschi
395c2d7372
docker: add curl to the image (#2124) 2024-06-10 05:35:59 -07:00
ogabrielluiz
69fad76281 chore: Update Dockerfile to remove frontend build artifacts 2024-06-07 09:12:27 -03:00
ogabrielluiz
c2b2e9a286 🔧 (build_and_push.Dockerfile): Add support for building and pushing frontend code in a separate node builder stage to improve build process efficiency
🔧 (build_and_push.Dockerfile): Update pip install command to force reinstall dependencies to ensure consistency
🐛 (code_parser.py): Change logger.exception to logger.debug to prevent logging full exception stack trace
🐛 (directory_reader.py): Change logger.error to logger.debug and log error message separately to improve error handling and logging clarity
2024-06-06 19:45:18 -03:00
Gabriel Luiz Freitas Almeida
d929780183
Update dependencies and fix import paths (#2101)
* chore: Update dependencies and build frontend in Dockerfile

* chore: Update lodash import and fix import paths

* chore: Update Dockerfile to remove unnecessary frontend build step
2024-06-06 13:18:56 -07:00
Nicolò Boschi
ba59a9f449
docker: improve image layout and backend-only/frontend-only images (#2071)
* docker: improve image layout and backend-only image

* add tests

* add tests

* add frontend

* add frontend

* label

* fix
2024-06-05 04:46:14 -07:00
ogabrielluiz
23d3c45a1b refactor: Update Dockerfile and render.yaml for pre-release deployment
The Dockerfile `render.pre-release.Dockerfile` has been added to the repository, which sets the base image to `langflowai/langflow:1.0-alpha`. Additionally, the `render.yaml` file has been modified to use the new Dockerfile path `./docker/render.pre-release.Dockerfile` for the `langflow` web service. This change ensures that the pre-release version of the application is deployed correctly.

Note: The commit message has been generated based on the provided code changes and recent commits.
2024-06-03 14:05:33 -03:00
Gabriel Luiz Freitas Almeida
482ac3fbfc
Refactor base.py and Dockerfile, and folder column migration (#2002)
* refactor(base.py): handle ImportError when importing is_pre_release function from langflow.version module to prevent crashing the application
feat(base.py): dynamically determine if the version is a pre-release version by checking for 'a', 'b', or 'rc' in the version number

* fix(Dockerfile): add missing backslash to ensure proper chaining of commands

* refactor: Update get_lifespan function to handle ImportError and dynamically determine the version number

The get_lifespan function in main.py has been updated to handle ImportError when importing the __version__ attribute from the langflow.version module. If the import fails, the version number is dynamically determined using the importlib.metadata.version function. This change ensures that the application does not crash when the langflow.version module is not available.

Note: This commit message follows the convention used in the recent user commits.

* chore: Add langflow-pre.db and langflow.db to .dockerignore

* chore: Update .dockerignore to include langflow-pre.db and langflow.db

* refactor: Add folder_id column to flow table and handle folder column migration

This commit adds the folder_id column to the flow table in the database. It also handles the migration of the folder column to the new folder_id column. This change allows for better organization and management of flows within folders.

Note: This commit message follows the convention used in the recent user commits.

* refactor: Update Dockerfiles to include user creation and environment variable

This commit updates the Dockerfiles to include the creation of a user with UID 1000 and the necessary permissions for the /app/langflow directory. It also adds the user's local bin directory to the PATH environment variable. This change improves the security and isolation of the application within the container.

Note: This commit message follows the convention used in the recent user commits.
2024-05-28 14:27:02 -07:00
ogabrielluiz
4bcc060f75 chore: Update Dockerfiles to create langflow directory and grant write permissions 2024-05-28 16:01:02 -03:00
Gabriel Luiz Freitas Almeida
56f13c918b
Reorganize repo (#1971)
* chore: Update dockerfile paths and branch name in render.yaml and release.yml

* chore(readthedocs.yaml): remove .readthedocs.yaml file as it is no longer needed
chore(base.Dockerfile): remove base.Dockerfile as it is no longer used in the project
feat(cdk-docker-compose.yml): add cdk-docker-compose.yml file to set up docker-compose for backend and frontend services

* move dockerignore

* chore: Remove test-results/.last-run.json file

* chore: Cache Node.js dependencies during workflow execution

* chore: Remove npm cache from workflow and cache Node.js dependencies

* chore: Update shardIndex and shardTotal values in typescript_test.yml workflow

* chore: Update Playwright test command with shard and worker options
2024-05-27 06:55:32 -07:00