icynet-admin/entrypoint.sh

14 lines
408 B
Bash
Executable File

#!/bin/sh
set -Ex
function apply_path {
test -n "$NEXT_PUBLIC_URL"
test -n "$NEXT_PUBLIC_UPLOADS_URL"
find /app/.next \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i "s#APP_NEXT_PUBLIC_URL#$NEXT_PUBLIC_URL#g"
find /app/.next \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i "s#APP_NEXT_PUBLIC_UPLOADS_URL#$NEXT_PUBLIC_UPLOADS_URL#g"
}
apply_path
exec "$@"