Add base kubernetes support 3
This commit is contained in:
@@ -40,8 +40,16 @@ COPY <<'EOF' /docker-entrypoint.d/30-substitute-env.sh
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# Default values for environment variables
|
||||
export VITE_API_URL=${VITE_API_URL:-"http://gateway-service:8000"}
|
||||
# Handle VITE_API_URL specially to preserve empty values
|
||||
# If VITE_API_URL is unset, use default; if empty, preserve empty; otherwise use value
|
||||
if [ -z "${VITE_API_URL+x}" ]; then
|
||||
export VITE_API_URL="http://gateway-service:8000"
|
||||
elif [ -z "$VITE_API_URL" ]; then
|
||||
# If VITE_API_URL is explicitly set to empty string, preserve it
|
||||
export VITE_API_URL=""
|
||||
fi
|
||||
|
||||
# Default values for other environment variables
|
||||
export VITE_APP_TITLE=${VITE_APP_TITLE:-"PanIA Dashboard"}
|
||||
export VITE_APP_VERSION=${VITE_APP_VERSION:-"1.0.0"}
|
||||
|
||||
@@ -92,4 +100,4 @@ HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \
|
||||
CMD curl -f http://localhost:3000/health || exit 1
|
||||
|
||||
# Start nginx
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
|
||||
Reference in New Issue
Block a user