fix: require production database connection environment
This commit is contained in:
@@ -204,12 +204,15 @@ jobs:
|
||||
echo "ERROR: QuantEngine.Web.dll not found"
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -f "$DEPLOY_DIR/appsettings.Production.json" ]; then
|
||||
echo "ERROR: appsettings.Production.json not found"
|
||||
echo "✓ DLL verified"
|
||||
# Production connection settings must come from the service
|
||||
# EnvironmentFile, never from a versioned appsettings file.
|
||||
SERVICE_ENV=$(sudo systemctl show "$SERVICE_NAME" -p EnvironmentFiles --value 2>/dev/null || true)
|
||||
if [ -z "$SERVICE_ENV" ]; then
|
||||
echo "ERROR: $SERVICE_NAME has no EnvironmentFile; database credentials are not configured"
|
||||
exit 1
|
||||
fi
|
||||
echo "✓ DLL verified"
|
||||
echo "✓ Config verified"
|
||||
echo "✓ External service environment configured"
|
||||
|
||||
# 3. Update Symlink
|
||||
echo ""
|
||||
|
||||
Reference in New Issue
Block a user