From 9edf4a5da2b9f79ed55d5e5d0a30997f16ba2bb4 Mon Sep 17 00:00:00 2001 From: ncd Date: Sat, 6 Dec 2025 13:58:15 +0100 Subject: [PATCH] MINIO_IMAGE from docker.io and with fixed tag, minio_ctr works. Stops systemd pod at start. --- bin/create_pod_langflow.sh | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/bin/create_pod_langflow.sh b/bin/create_pod_langflow.sh index 1d88975..eaa9591 100755 --- a/bin/create_pod_langflow.sh +++ b/bin/create_pod_langflow.sh @@ -19,8 +19,11 @@ POSTGRES_IMAGE='docker.io/library/postgres:16' LANGFUSE_WEB_IMAGE='docker.io/langfuse/langfuse:3' LANGFUSE_WORKER_IMAGE='docker.io/langfuse/langfuse-worker:3' CLICKHOUSE_IMAGE='docker.io/clickhouse/clickhouse-server:25.11' -# Chainguard provides only :latest? https://images.chainguard.dev/directory/image/minio/versions -MINIO_IMAGE='cgr.dev/chainguard/minio' +# Using official MinIO image here because the Chainguard image used in Langfuse +# docker-compose example does not ship +# a shell, but this script relies on a small shell wrapper to pre-create the +# langfuse bucket. And Chainguard offers only tag :latest. +MINIO_IMAGE='docker.io/minio/minio:RELEASE.2025-09-07T16-13-09Z' REDIS_IMAGE='docker.io/redis:7' HOST_LOCAL_IP='127.0.0.1' @@ -45,7 +48,7 @@ LANGFUSE_COMMON_ENV=( -e NEXTAUTH_URL="$LANGFUSE_PUBLIC_URL" -e DATABASE_URL="postgresql://langflow:langflow@localhost:5432/langfuse" -e SALT="qwexoiuzxequtbfvyqewregvg" - -e ENCRYPTION_KEY="57db4291f0243a9f6bbbf82d3fbca1a72c58fd42f852a4d74e3db8b55bee720a" # TODO: change to a secure 64-char hex key + -e ENCRYPTION_KEY="57db4291f0243a9f6bbbf82d3fbca1a72c58fd42f852a4d74e3db8b55bee720a" -e TELEMETRY_ENABLED=true -e LANGFUSE_ENABLE_EXPERIMENTAL_FEATURES=true -e CLICKHOUSE_MIGRATION_URL="clickhouse://localhost:9000" @@ -90,6 +93,12 @@ LANGFUSE_COMMON_ENV=( -e SMTP_CONNECTION_URL= ) +# Stop existing systemd-managed pod if present, to avoid conflicts on rerun +echo "Ending systemd-managed pod 'pod-$POD_NAME.service if it exists" +if systemctl --user list-units --type=service --all 2>/dev/null | grep -q 'pod-$POD_NAME.service'; then + systemctl --user stop pod-langflow_pod.service || true +fi + # Prepare directories mkdir -p "$LANGFLOW_DATA_DIR" "$POSTGRES_DATA_DIR" \ "$LANGFUSE_CLICKHOUSE_DATA_DIR" "$LANGFUSE_CLICKHOUSE_LOGS_DIR" \ @@ -154,12 +163,15 @@ podman run -d --name "$CLICKHOUSE_CTR_NAME" --pod "$POD_NAME" \ echo "Container '$CLICKHOUSE_CTR_NAME' started (rc=$?)" # Minio container (S3-compatible storage for Langfuse) +# NOTE: The official MinIO image uses the `minio` binary as entrypoint. +# We call `server` directly as the container command and rely on Langfuse +# to create buckets on first use via the S3 API. podman run -d --name "$MINIO_CTR_NAME" --pod "$POD_NAME" \ -e MINIO_ROOT_USER=minio \ -e MINIO_ROOT_PASSWORD=miniosecret \ -v "$LANGFUSE_MINIO_DATA_DIR:/data:Z" \ "$MINIO_IMAGE" \ - sh -c 'mkdir -p /data/langfuse && minio server --address ":9000" --console-address ":9001" /data' + server --address ":9000" --console-address ":9001" /data echo "Container '$MINIO_CTR_NAME' started (rc=$?)" # Redis container (queue/cache for Langfuse)