555e282cc4
pi-agent-plugin checks / lint (push) Has been cancelled
pi-agent-plugin checks / test (20) (push) Has been cancelled
pi-agent-plugin checks / test (22) (push) Has been cancelled
pi-agent-plugin checks / build (push) Has been cancelled
TypeScript SDK CI / check_changes (push) Has been cancelled
TypeScript SDK CI / changelog_check (push) Has been cancelled
ci / changelog_check (push) Has been cancelled
ci / check_changes (push) Has been cancelled
ci / build_mem0 (3.10) (push) Has been cancelled
ci / build_mem0 (3.11) (push) Has been cancelled
ci / build_mem0 (3.12) (push) Has been cancelled
CLI Node CI / lint (push) Has been cancelled
CLI Node CI / test (20) (push) Has been cancelled
CLI Node CI / test (22) (push) Has been cancelled
CLI Node CI / build (push) Has been cancelled
CLI Python CI / lint (push) Has been cancelled
CLI Python CI / test (3.10) (push) Has been cancelled
CLI Python CI / test (3.11) (push) Has been cancelled
CLI Python CI / test (3.12) (push) Has been cancelled
CLI Python CI / build (push) Has been cancelled
openclaw checks / lint (push) Has been cancelled
openclaw checks / test (20) (push) Has been cancelled
openclaw checks / test (22) (push) Has been cancelled
openclaw checks / build (push) Has been cancelled
opencode-plugin checks / build (push) Has been cancelled
TypeScript SDK CI / build_ts_sdk (20) (push) Has been cancelled
TypeScript SDK CI / build_ts_sdk (22) (push) Has been cancelled
TypeScript SDK CI / integration_ts_sdk (20) (push) Has been cancelled
TypeScript SDK CI / integration_ts_sdk (22) (push) Has been cancelled
18 lines
671 B
Bash
18 lines
671 B
Bash
#!/bin/sh
|
|
set -e
|
|
|
|
cd /app
|
|
|
|
# Swap NEXT_PUBLIC_* placeholders baked into .next/ at build time with the
|
|
# container's real env values. Each placeholder must be declared in the
|
|
# Dockerfile as `ENV NAME=NAME` so Next.js inlines the literal name. Currently:
|
|
# NEXT_PUBLIC_API_URL, NEXT_PUBLIC_INSTANCE_NAME
|
|
# New NEXT_PUBLIC_* vars must be added to the Dockerfile or this loop won't substitute them.
|
|
printenv | grep '^NEXT_PUBLIC_' | while IFS='=' read -r key value; do
|
|
escaped=$(printf '%s' "$value" | sed -e 's/[\\&|]/\\&/g')
|
|
find .next/ -type f -exec sed -i "s|$key|$escaped|g" {} \;
|
|
done
|
|
echo "Done replacing env variables NEXT_PUBLIC_ with real values"
|
|
|
|
exec "$@"
|