This ASP.NET Core sample app illustrates how to use the Steeltoe Cloud Foundry configuration provider to parse the VCAP_* environment variables and add them as a configuration source.
- Installed Pivotal CloudFoundry
- .NET Core SDK
cf target -o myorg -s development
cd src/CloudFoundry
dotnet restore
- Publish app to a directory selecting the framework and runtime you want to run on:
dotnet publish -f netcoreapp3.1 -r linux-x64
- Push the app using the appropriate manifest:
cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/linux-x64/publish
cf push -f manifest-windows.yml -p bin/Debug/netcoreapp3.1/win10-x64/publish
The cf push
will create an app in the space by the name cloud
. You can hit the app @ https://cloud.x.y.z/
.
Use the menus at the top of the app to see various output:
CloudFoundry Settings
- should showVCAP_APPLICATION
andVCAP_SERVICES
configuration data.