🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
fix: do not execute db migration in web container if configured in env (#2446)
Max Deichmann0bbf87abfd09
diff --git a/web/Dockerfile b/web/Dockerfileindex 18b3b6d878..4aa75995fa 100644--- a/web/Dockerfile+++ b/web/Dockerfile@@ -41,6 +41,7 @@ ARG NEXT_PUBLIC_TURNSTILE_SITE_KEYARG NEXT_PUBLIC_POSTHOG_KEYARG NEXT_PUBLIC_POSTHOG_HOSTARG NEXT_PUBLIC_CRISP_WEBSITE_ID+ARG LANFUSE_WEB_MIGRATION_ENABLED# Copy source code of isolated subworkspaceCOPY --from=pruner /app/out/full/ .diff --git a/web/entrypoint.sh b/web/entrypoint.shindex ae58f4c305..8d64be98fd 100644--- a/web/entrypoint.sh+++ b/web/entrypoint.sh@@ -19,10 +19,13 @@ if [ -z "$DIRECT_URL" ]; thenexport DIRECT_URL=$DATABASE_URLfi-prisma db execute --url "$DIRECT_URL" --file "./packages/shared/scripts/cleanup.sql"+# Always execute the scripts, except when disabled.+if [ "$LANFUSE_WEB_MIGRATION_DISABLED" != "true" ]; then+ prisma db execute --url "$DIRECT_URL" --file "./packages/shared/scripts/cleanup.sql"-# Apply migrations-prisma migrate deploy --schema=./packages/shared/prisma/schema.prisma+ # Apply migrations+ prisma migrate deploy --schema=./packages/shared/prisma/schema.prisma+fistatus=$?# If migration fails (returns non-zero exit status), exit script with that statusdiff --git a/web/src/sentry.server.config.ts b/web/src/sentry.server.config.tsindex 6f656cd397..69a653d44d 100644--- a/web/src/sentry.server.config.ts+++ b/web/src/sentry.server.config.ts@@ -25,7 +25,7 @@ if (process.env.NEXT_PUBLIC_SENTRY_DSN)) {return 0.1;}- return 0.01;+ return 0.1;},profilesSampleRate: 0.1,