使用Docker在Rocky Linux 9.5上在线部署LangFlow

满足条件:

能够访问互联网,并且能够下载镜像。

Use Docker Compose to build Langflow with a persistent PostgreSQL database service:

获取 Langflow 仓库(repository):

git clone https://github.com/langflow-ai/langflow.git

导航到 the docker_example 目录:

cd langflow/docker_example

运行 the Docker Compose 文件:

docker compose up

备注:

后台运行:docker compose up -d

访问 Langflow

http://localhost:7860/

root@rocky95 docker_example# docker compose up

+ Running 5/5

✔ Network docker_example_default Created 0.3s

✔ Volume "docker_example_langflow-postgres" Created 0.0s

✔ Volume "docker_example_langflow-data" Created 0.0s

✔ Container docker_example-postgres-1 Created 0.3s

✔ Container docker_example-langflow-1 Created 0.3s

Attaching to langflow-1, postgres-1

postgres-1 | The files belonging to this database system will be owned by user "postgres".

postgres-1 | This user must also own the server process.

postgres-1 |

postgres-1 | The database cluster will be initialized with locale "en_US.utf8".

postgres-1 | The default database encoding has accordingly been set to "UTF8".

postgres-1 | The default text search configuration will be set to "english".

postgres-1 |

postgres-1 | Data page checksums are disabled.

postgres-1 |

postgres-1 | fixing permissions on existing directory /var/lib/postgresql/data ... ok

postgres-1 | creating subdirectories ... ok

postgres-1 | selecting dynamic shared memory implementation ... posix

postgres-1 | selecting default max_connections ... 100

postgres-1 | selecting default shared_buffers ... 128MB

postgres-1 | selecting default time zone ... Etc/UTC

postgres-1 | creating configuration files ... ok

postgres-1 | running bootstrap script ... ok

postgres-1 | performing post-bootstrap initialization ... ok

postgres-1 | syncing data to disk ... ok

postgres-1 |

postgres-1 | initdb: warning: enabling "trust" authentication for local connections

postgres-1 | initdb: hint: You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb.

postgres-1 |

postgres-1 | Success. You can now start the database server using:

postgres-1 |

postgres-1 | pg_ctl -D /var/lib/postgresql/data -l logfile start

postgres-1 |

postgres-1 | waiting for server to start....2025-07-28 10:44:31.573 UTC 48 LOG: starting PostgreSQL 16.9 (Debian 16.9-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit

postgres-1 | 2025-07-28 10:44:31.591 UTC 48 LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"

postgres-1 | 2025-07-28 10:44:31.659 UTC 51 LOG: database system was shut down at 2025-07-28 10:44:29 UTC

postgres-1 | 2025-07-28 10:44:31.697 UTC 48 LOG: database system is ready to accept connections

postgres-1 | done

postgres-1 | server started

postgres-1 | CREATE DATABASE

postgres-1 |

postgres-1 |

postgres-1 | /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*

postgres-1 |

postgres-1 | 2025-07-28 10:44:32.139 UTC 48 LOG: received fast shutdown request

postgres-1 | waiting for server to shut down...2025-07-28 10:44:32.217 UTC 48 LOG: aborting any active transactions

postgres-1 | .2025-07-28 10:44:32.220 UTC 48 LOG: background worker "logical replication launcher" (PID 54) exited with exit code 1

postgres-1 | 2025-07-28 10:44:32.224 UTC 49 LOG: shutting down

postgres-1 | 2025-07-28 10:44:32.255 UTC 49 LOG: checkpoint starting: shutdown immediate

postgres-1 | 2025-07-28 10:44:32.761 UTC 49 LOG: checkpoint complete: wrote 922 buffers (5.6%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.087 s, sync=0.345 s, total=0.537 s; sync files=301, longest=0.278 s, average=0.002 s; distance=4255 kB, estimate=4255 kB; lsn=0/1912108, redo lsn=0/1912108

postgres-1 | 2025-07-28 10:44:32.769 UTC 48 LOG: database system is shut down

postgres-1 | done

postgres-1 | server stopped

postgres-1 |

postgres-1 | PostgreSQL init process complete; ready for start up.

postgres-1 |

postgres-1 | 2025-07-28 10:44:32.937 UTC 1 LOG: starting PostgreSQL 16.9 (Debian 16.9-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit

postgres-1 | 2025-07-28 10:44:32.938 UTC 1 LOG: listening on IPv4 address "0.0.0.0", port 5432

postgres-1 | 2025-07-28 10:44:32.938 UTC 1 LOG: listening on IPv6 address "::", port 5432

postgres-1 | 2025-07-28 10:44:33.031 UTC 1 LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"

postgres-1 | 2025-07-28 10:44:33.098 UTC 64 LOG: database system was shut down at 2025-07-28 10:44:32 UTC

postgres-1 | 2025-07-28 10:44:33.131 UTC 1 LOG: database system is ready to accept connections

✓ Initializing Langflow...

✓ Checking Environment...

✓ Starting Core Services...

✓ Connecting Database...

✓ Loading Components...

✓ Adding Starter Projects...

postgres-1 | 2025-07-28 10:44:47.820 UTC 68 ERROR: relation "alembic_version" does not exist at character 15

postgres-1 | 2025-07-28 10:44:47.820 UTC 68 STATEMENT: SELECT * FROM alembic_version

▣ Launching Langflow...07/28/25 10:44:47 INFO 2025-07-28 10:44:47 - INFO - service.py:309

langflow-1 | service - Initializing alembic

✓ Launching Langflow...

langflow-1 |

langflow-1 | ╭─────────────────────────────────────────────────────────────────────────╮

langflow-1 | │ │

langflow-1 | │ Welcome to Langflow │

langflow-1 | │ │

langflow-1 | │ 🌟 GitHub: Star for updates → https://github.com/langflow-ai/langflow

langflow-1 | │ 💬 Discord: Join for support → https://discord.com/invite/EqksyE2EX9

langflow-1 | │ │

langflow-1 | │ We collect anonymous usage data to improve Langflow. │

langflow-1 | │ To opt out, set: DO_NOT_TRACK=true in your environment. │

langflow-1 | │ │

langflow-1 | │ 🟢 Open Langflow → http://localhost:7860

langflow-1 | │ │

langflow-1 | ╰─────────────────────────────────────────────────────────────────────────╯

postgres-1 | 2025-07-28 10:49:33.187 UTC 62 LOG: checkpoint starting: time

postgres-1 | 2025-07-28 10:50:08.184 UTC 62 LOG: checkpoint complete: wrote 349 buffers (2.1%); 0 WAL file(s) added, 0 removed, 0 recycled; write=34.707 s, sync=0.127 s, total=34.997 s; sync files=188, longest=0.102 s, average=0.001 s; distance=2159 kB, estimate=2159 kB; lsn=0/1B2DE20, redo lsn=0/1B2DDE8

langflow-1 | 07/28/25 11:22:01 WARNING 2025-07-28 11:22:01 - WARNING - local local.py:60

langflow-1 | - File 046-rocket.svg not found in flow

langflow-1 | app/langflow/profile_pictures/Space.

langflow-1 | WARNING 2025-07-28 11:22:01 - WARNING - local local.py:60

langflow-1 | - File 046-rocket.svg not found in flow

langflow-1 | app/langflow/profile_pictures/Space.

postgres-1 | 2025-07-28 11:24:33.773 UTC 62 LOG: checkpoint starting: time

postgres-1 | 2025-07-28 11:24:34.111 UTC 62 LOG: checkpoint complete: wrote 2 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.102 s, sync=0.034 s, total=0.339 s; sync files=2, longest=0.034 s, average=0.017 s; distance=1 kB, estimate=1943 kB; lsn=0/1B2E260, redo lsn=0/1B2E228

langflow-1 | 07/28/25 12:39:40 WARNING 2025-07-28 12:39:40 - WARNING - local local.py:60

langflow-1 | - File 046-rocket.svg not found in flow

langflow-1 | app/langflow/profile_pictures/Space.

langflow-1 | WARNING 2025-07-28 12:39:40 - WARNING - local local.py:60

langflow-1 | - File 046-rocket.svg not found in flow

langflow-1 | app/langflow/profile_pictures/Space.

Gracefully stopping... (press Ctrl+C again to force)

+ Stopping 2/2

✔ Container docker_example-langflow-1 Stopped 3.5s

✔ Container docker_example-postgres-1 Stopped 0.7s

root@rocky95 docker_example#

相关推荐
deephub几秒前
相关性与因果性:识别伪相关以提升模型在真实环境的可用性
人工智能·机器学习·数据挖掘·数据分析
不会C语言的男孩1 分钟前
Linux 系统编程 · 第 2 章:系统调用与库函数
linux·c语言
2601_955505252 分钟前
行业研究|AI-Ready高质量数据集建设难点与元数据标准化解决方案(基于国家数据局25号文)
人工智能·金融·能源·健康医疗·制造·政务
虾壳云官方2 分钟前
【本地 AI 自动化最新工具】 OpenClaw 2.7.9 Windows 完整部署教程(包含安装包)
人工智能·windows·openclaw·openclaw安装·openclaw一键部署
坤昱4 分钟前
cfs调度类深入解刨——psi科普篇
linux·cfs·psi·cfs调度·eevdf·psi详细分析·linux系统资源监控
ai产品老杨5 分钟前
解耦异构安防:基于 Docker 与边缘计算的 AI 视频管理平台,如何实现 GB28181/RTSP 统一接入与全源码交付
人工智能·docker·边缘计算
趋之7 分钟前
千问大模型核心能力与实战效果全景展示
人工智能
zhangfeng11338 分钟前
ONNX Runtime 微软的推理引擎 TensorRT,NVIDIA GPU 上的深度学习推理, CUDA Graph
人工智能·深度学习·microsoft
硬核子牙19 分钟前
你管这破玩意叫ChatGPT?
人工智能·chatgpt·程序员
亲爱的译官.22 分钟前
能精准双语翻译的智能手表!独立离线可用,全能好用更省心
人工智能·旅游·智能手表·亲爱的翻译官·翻译设备