fix produc domain name for the image creation
This commit is contained in:
@@ -139,6 +139,22 @@ build_image:
|
||||
- echo "$REGISTRY_PASSWORD" | docker login "$REGISTRY_HOST" -u "$REGISTRY_USER" --password-stdin
|
||||
script:
|
||||
- echo "--- Building Docker Image ---"
|
||||
- |
|
||||
for var_name in NEXT_PUBLIC_API_URL NEXT_PUBLIC_MARKETPLACE_URL NEXT_PUBLIC_DASHBOARD_URL NEXT_PUBLIC_ADMIN_URL; do
|
||||
var_value="$(printenv "$var_name" || true)"
|
||||
|
||||
if [ -z "$var_value" ]; then
|
||||
echo "$var_name is not set. Refusing to build a production image with missing public frontend URLs." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "$var_value" in
|
||||
*example.com*)
|
||||
echo "$var_name=$var_value still uses the placeholder example.com domain. Update the GitLab CI/CD variable before building." >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
# NEXT_PUBLIC_* vars are inlined into Next.js bundles at build time — must be passed as ARGs
|
||||
- |
|
||||
docker build \
|
||||
|
||||
Reference in New Issue
Block a user