forked from TailAdmin/free-nextjs-admin-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathentrypoint.sh
28 lines (21 loc) · 1.65 KB
/
entrypoint.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh
echo "Check that we have NEXT_PUBLIC_BACKEND_BASE_PATH vars"
test -n "$NEXT_PUBLIC_BACKEND_BASE_PATH"
find /app/.next \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i "s#APP_NEXT_PUBLIC_BACKEND_BASE_PATH#$NEXT_PUBLIC_BACKEND_BASE_PATH#g"
echo "Check that we have NEXT_PUBLIC_KEYCLOAK_URL vars"
test -n "$NEXT_PUBLIC_KEYCLOAK_URL"
find /app/.next \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i "s#APP_NEXT_PUBLIC_KEYCLOAK_URL#$NEXT_PUBLIC_KEYCLOAK_URL#g"
echo "Check that we have NEXT_PUBLIC_KEYCLOAK_CLIENT_ID vars"
test -n "$NEXT_PUBLIC_KEYCLOAK_CLIENT_ID"
find /app/.next \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i "s#APP_NEXT_PUBLIC_KEYCLOAK_CLIENT_ID#$NEXT_PUBLIC_KEYCLOAK_CLIENT_ID#g"
echo "Check that we have NEXT_PUBLIC_KEYCLOAK_REDIRECT_URI vars"
test -n "$NEXT_PUBLIC_KEYCLOAK_REDIRECT_URI"
find /app/.next \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i "s#APP_NEXT_PUBLIC_KEYCLOAK_REDIRECT_URI#$NEXT_PUBLIC_KEYCLOAK_REDIRECT_URI#g"
echo "Check that we have NEXT_PUBLIC_KEYCLOAK_POST_LOGOUT_REDIRECT_URI vars"
test -n "$NEXT_PUBLIC_KEYCLOAK_POST_LOGOUT_REDIRECT_URI"
find /app/.next \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i "s#APP_NEXT_PUBLIC_KEYCLOAK_POST_LOGOUT_REDIRECT_URI#$NEXT_PUBLIC_KEYCLOAK_POST_LOGOUT_REDIRECT_URI#g"
echo "Check that we have NEXT_PUBLIC_KEYCLOAK_PRES_REQ_CONF_ID vars"
test -n "$NEXT_PUBLIC_KEYCLOAK_PRES_REQ_CONF_ID"
find /app/.next \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i "s#APP_NEXT_PUBLIC_KEYCLOAK_PRES_REQ_CONF_ID#$NEXT_PUBLIC_KEYCLOAK_PRES_REQ_CONF_ID#g"
echo "Starting Nextjs"
exec "$@"