mirror of
https://github.com/hanzoai/flow.git
synced 2026-10-17 01:29:18 +00:00
Completes the rebrand per direction: LANGFLOW_/LANGFLOW -> FLOW_/FLOW (env vars, headers), langflow_ -> flow_ (settings fields, local vars), camelCase identifiers (LangflowClient/Logo/HTTPError, builtWithLangflow, getLangflowDesktop) -> Flow*, and all remaining bare tokens. Fixed the identifier-space hazard (Langflow -> 'Hanzo Flow' is prose-only; in code it collapses to Flow so no identifier gains a space). compileall of flow + lfx is clean. Repo-wide langflow now = 4, all the protected MIT attribution to langflow-ai/ langflow in README (legally required; deliberately preserved). Breaking (per no-backwards-compat / forward-perfection): the LANGFLOW_* env-var prefix is now FLOW_* — deployments must update their env. CI's uv + frontend build is the runtime gate.
33 lines
951 B
Bash
33 lines
951 B
Bash
#!/bin/sh
|
|
set -e
|
|
|
|
# Define writable directory for the final config
|
|
CONFIG_DIR="/tmp/nginx"
|
|
mkdir -p $CONFIG_DIR
|
|
|
|
# Check and set environment variables
|
|
if [ -z "$BACKEND_URL" ]; then
|
|
BACKEND_URL="$1"
|
|
fi
|
|
if [ -z "$FRONTEND_PORT" ]; then
|
|
FRONTEND_PORT="$2"
|
|
fi
|
|
if [ -z "$FRONTEND_PORT" ]; then
|
|
FRONTEND_PORT="80"
|
|
fi
|
|
if [ -z "$FLOW_MAX_FILE_SIZE_UPLOAD" ]; then
|
|
FLOW_MAX_FILE_SIZE_UPLOAD="1"
|
|
fi
|
|
if [ -z "$BACKEND_URL" ]; then
|
|
echo "BACKEND_URL must be set as an environment variable or as first parameter. (e.g. http://localhost:7860)"
|
|
exit 1
|
|
fi
|
|
|
|
# Export variables for envsubst
|
|
export BACKEND_URL FRONTEND_PORT FLOW_MAX_FILE_SIZE_UPLOAD
|
|
|
|
# Use envsubst to substitute environment variables in the template
|
|
envsubst '${BACKEND_URL} ${FRONTEND_PORT} ${FLOW_MAX_FILE_SIZE_UPLOAD}' < /etc/nginx/conf.d/default.conf.template > $CONFIG_DIR/default.conf
|
|
|
|
# Start nginx with the new configuration
|
|
exec nginx -c $CONFIG_DIR/default.conf -g 'daemon off;' |