Document environment variable precedence and API configuration scheme
Add comprehensive documentation explaining the order of precedence for environment variables in TimeSafari project. Covers shell script overrides, platform-specific configurations, .env file usage, and API alignment between claim and partner APIs. Includes troubleshooting guide and best practices for maintaining consistent environment configuration across development, test, and production environments.
This commit is contained in:
@@ -186,15 +186,17 @@ log_info "Build type: $BUILD_TYPE"
|
||||
# Setup environment for Capacitor build
|
||||
setup_build_env "capacitor"
|
||||
|
||||
# Override API server for Android development
|
||||
# Override API servers for Android development
|
||||
if [ "$BUILD_MODE" = "development" ]; then
|
||||
if [ -n "$CUSTOM_API_IP" ]; then
|
||||
# Use custom IP for physical device development
|
||||
export VITE_DEFAULT_ENDORSER_API_SERVER="http://${CUSTOM_API_IP}:3000"
|
||||
export VITE_DEFAULT_PARTNER_API_SERVER="http://${CUSTOM_API_IP}:3000"
|
||||
log_info "Android development mode: Using custom IP ${CUSTOM_API_IP} for physical device"
|
||||
else
|
||||
# Use Android emulator IP (10.0.2.2) for Android development
|
||||
export VITE_DEFAULT_ENDORSER_API_SERVER="http://10.0.2.2:3000"
|
||||
export VITE_DEFAULT_PARTNER_API_SERVER="http://10.0.2.2:3000"
|
||||
log_debug "Android development mode: Using 10.0.2.2 for emulator"
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user