This repository has been archived on 2024-06-14. You can view files and clone it, but cannot push or open issues or pull requests.
icynet-admin/entrypoint.sh

14 lines
408 B
Bash
Raw Normal View History

2022-11-27 10:17:00 +00:00
#!/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 "$@"