From 44e7fc4a431e530dbf7a43b38c831d2dbac70739 Mon Sep 17 00:00:00 2001 From: Liam <67254223+RealFascinated@users.noreply.github.com> Date: Wed, 26 Oct 2022 15:30:46 +0100 Subject: [PATCH] i give up --- entrypoint.sh | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 72ee8ba..7dbe5b0 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,26 +1,25 @@ #!/bin/sh -echo "Checking that NEXT_PUBLIC_API_URL env var" +echo "Check that we have NEXT_PUBLIC_API_URL vars" test -n "$NEXT_PUBLIC_HTTP_PROXY" -echo "Checking that NEXT_PUBLIC_SITE_NAME env var" +echo "Check that we have NEXT_PUBLIC_SITE_NAME vars" test -n "$NEXT_PUBLIC_SITE_NAME" -echo "Checking that NEXT_PUBLIC_SITE_TITLE env var" +echo "Check that we have NEXT_PUBLIC_SITE_TITLE vars" test -n "$NEXT_PUBLIC_SITE_TITLE" -echo "Checking that NEXT_PUBLIC_SITE_DESCRIPTION env var" +echo "Check that we have NEXT_PUBLIC_SITE_DESCRIPTION vars" test -n "$NEXT_PUBLIC_SITE_DESCRIPTION" -echo "Checking that NEXT_PUBLIC_SITE_COLOR env var" +echo "Check that we have NEXT_PUBLIC_SITE_COLOR vars" test -n "$NEXT_PUBLIC_SITE_COLOR" -echo "Checking that NEXT_PUBLIC_SITE_URL env var" +echo "Check that we have NEXT_PUBLIC_SITE_URL vars" test -n "$NEXT_PUBLIC_SITE_URL" -files = $(find /app/.next \( -type d -name .git -prune \) -o -type f -print0 | xargs -0) - -$files $(sed -i "s#APP_NEXT_PUBLIC_HTTP_PROXY#$NEXT_PUBLIC_HTTP_PROXY#g") -$files $(sed -i "s#APP_NEXT_PUBLIC_SITE_NAME#$NEXT_PUBLIC_SITE_NAME#g") -$files $(sed -i "s#APP_NEXT_PUBLIC_SITE_TITLE#$NEXT_PUBLIC_SITE_TITLE#g") -$files $(sed -i "s#APP_NEXT_PUBLIC_SITE_DESCRIPTION#$NEXT_PUBLIC_SITE_DESCRIPTION#g") -$files $(sed -i "s#APP_NEXT_PUBLIC_SITE_COLOR#$NEXT_PUBLIC_SITE_COLOR#g") -$files $(sed -i "s#APP_NEXT_PUBLIC_SITE_URL#$NEXT_NEXT_PUBLIC_SITE_URL#g") +# Make this less shit some time +find /app/.next \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i "s#APP_NEXT_PUBLIC_HTTP_PROXY#$NEXT_PUBLIC_HTTP_PROXY#g" +find /app/.next \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i "s#APP_NEXT_PUBLIC_SITE_NAME#$NEXT_PUBLIC_SITE_NAME#g" +find /app/.next \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i "s#APP_NEXT_PUBLIC_SITE_TITLE#$NEXT_PUBLIC_SITE_TITLE#g" +find /app/.next \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i "s#APP_NEXT_PUBLIC_SITE_DESCRIPTION#$NEXT_PUBLIC_SITE_DESCRIPTION#g" +find /app/.next \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i "s#APP_NEXT_NEXT_PUBLIC_SITE_COLOR#$NEXT_PUBLIC_SITE_COLOR#g" +find /app/.next \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i "s#APP_NEXT_NEXT_PUBLIC_SITE_URL#$NEXT_NEXT_PUBLIC_SITE_URL#g" echo "Starting NextJS" exec "$@"