diff --git a/documentation/port-mapping.md b/documentation/port-mapping.md index 2ca2f0bd2..e171b9228 100644 --- a/documentation/port-mapping.md +++ b/documentation/port-mapping.md @@ -161,6 +161,7 @@ Container Port(s) | Internal Port(s) | Service (alternatives) | 7688 | 7687 | neo4j-2 | 7689 | 7687 | neo4j-3 | 7690 | 7687 | memgraph-platform | +7860 | 7860 | langflow-backend | 8000 | 8000 | kong (proxy) | 8001 | 8001 | kong (admin api) | 8002 | 8002 | kong (admin gui) | @@ -615,6 +616,8 @@ Container Port(s) | Internal Port(s) | Service (alternatives) | 28363 | 9200 | datahub-opensearch | 28364 | 8080 | autogen-studio | 28365 | 3000 | alpaca-webui | +28366 | 7860 | langflow-frontend | + ## Ports > 28500 diff --git a/modern-data-platform-stack/generator-config/stack-config.yml b/modern-data-platform-stack/generator-config/stack-config.yml index 5b3c1b3a3..9fc5388fa 100644 --- a/modern-data-platform-stack/generator-config/stack-config.yml +++ b/modern-data-platform-stack/generator-config/stack-config.yml @@ -300,6 +300,9 @@ vars: # Flowise FLOWISE_version: 1.6.3 + # Langflow + LANGFLOW_version: 1.0-alpha + # GPT Researcher GPT_RESEARCHER_version: 0.1.4 diff --git a/modern-data-platform-stack/generator-config/templates/docker-compose.yml.j2 b/modern-data-platform-stack/generator-config/templates/docker-compose.yml.j2 index df82cc252..2c3e55c44 100755 --- a/modern-data-platform-stack/generator-config/templates/docker-compose.yml.j2 +++ b/modern-data-platform-stack/generator-config/templates/docker-compose.yml.j2 @@ -274,6 +274,7 @@ networks: {% set __LITELLM_version = LITELLM_version | default('latest') -%} {% set __FLOWISE_version = FLOWISE_version | default('latest') -%} +{% set __LANGFLOW_version = LANGFLOW_version | default('latest') -%} {% set __GPT_RESEARCHER_version = GPT_RESEARCHER_version | default('latest') -%} @@ -714,6 +715,7 @@ networks: {% set AUTOGEN_STUDIO_enable = false -%} {% set LITELLM_enable = false -%} {% set FLOWISE_enable = false -%} + {% set LANGFLOW_enable = false -%} {% set DATAIKU_DSS_enable = false -%} {% set KIE_SERVER_enable = false -%} {% set METABASE_enable = false -%} @@ -11120,7 +11122,7 @@ services: {% endif -%} {# FLOWISE_database_type == mysql #} {% if (FLOWISE_database_type | lower) == 'postgres' %} DATABASE_PORT: 5432 - DATABASE_HOST: postgresql-1 + DATABASE_HOST: postgresql DATABASE_NAME: {{FLOWISE_database_name}} DATABASE_USER: {{FLOWISE_database_user}} DATABASE_PASSWORD: {{FLOWISE_database_password}} @@ -11162,6 +11164,42 @@ services: restart: {{container_restart_policy}} {% endif %} {# FLOWISE_enable #} +{%if LANGFLOW_enable | default(false) %} + # ================================== Langflow ========================================== # + langflow-backend: + image: logspace/langflow:{{__LANGFLOW_version}} + container_name: langflow-backend + hostname: langflow-backend + labels: + com.platys.name: 'langflow' + com.platys.description: 'visual way to build, iterate and deploy AI apps' + com.platys.webui.title: 'Langflow UI' + com.platys.webui.url: "http://dataplatform:7860" + ports: + - "7860:7860" + extra_hosts: + - "host.docker.internal:host-gateway" + environment: + LANGFLOW_DATABASE_URL: postgresql://{{LANGFLOW_database_user}}:{{LANGFLOW_database_password}}@postgresql:5432/{{LANGFLOW_database_name}} + LANGFLOW_CONFIG_DIR: /var/lib/langflow + {%if use_timezone | default(false) %} + TZ: {{use_timezone}} + {% endif -%} {# use_timezone #} + volumes: + - ./data-transfer:/data-transfer + {% if LANGFLOW_volume_map_data %} + - ./container-volumes/langflow/data:/var/lib/langflow + {% endif -%} {# FLOWISE_volume_map_data #} + {%if use_timezone | default(false) %} + - "./etc/timezone:/etc/timezone:ro" + - "./etc/localtime:/etc/localtime:ro" + {% endif -%} {# use_timezone #} + {%if logging_driver is defined and logging_driver and logging_driver in ('fluentd','loki','syslog','splunk') | default(false) %} + <<: *logging + {% endif -%} {# logging_driver is defined ... #} + restart: {{container_restart_policy}} +{% endif %} {# LANGFLOW_enable #} + {%if GPT_RESEARCHER_enable | default(false) %} # ================================== GPT Researcher ========================================== # gpt-researcher: diff --git a/modern-data-platform-stack/generator-config/vars/config.yml b/modern-data-platform-stack/generator-config/vars/config.yml index b0f8426f3..ad4003317 100644 --- a/modern-data-platform-stack/generator-config/vars/config.yml +++ b/modern-data-platform-stack/generator-config/vars/config.yml @@ -1154,6 +1154,15 @@ FLOWISE_langchain_api_key: FLOWISE_langchain_project: + # + # ===== Langflow ======== + # + LANGFLOW_enable: false + LANGFLOW_volume_map_data: false + LANGFLOW_database_user: postgres + LANGFLOW_database_password: abc123! + LANGFLOW_database_name: postgres + # # ===== GPT Researcher ======== # diff --git a/modern-data-platform-stack/static-data/container-volume/flowise/data/readme.txt b/modern-data-platform-stack/static-data/container-volume/flowise/data/readme.txt new file mode 100644 index 000000000..0b934e715 --- /dev/null +++ b/modern-data-platform-stack/static-data/container-volume/flowise/data/readme.txt @@ -0,0 +1 @@ +Contains the data of flowise service, if flag FLOWISE_volume_map_data is set to true. \ No newline at end of file diff --git a/modern-data-platform-stack/static-data/container-volume/langflow/data/readme.txt b/modern-data-platform-stack/static-data/container-volume/langflow/data/readme.txt new file mode 100644 index 000000000..e5e0f34e1 --- /dev/null +++ b/modern-data-platform-stack/static-data/container-volume/langflow/data/readme.txt @@ -0,0 +1 @@ +Contains the data of langflow service, if flag LANGFLOW_volume_map_data is set to true. \ No newline at end of file