This is a .NET Blazor Server example app to test deployments on Clever Cloud. Find more information about .NET deployment in Clever Cloud Documentation.
You have two options to deploy your application on Clever Cloud: using the Web Console or using the Clever Tools CLI.
- Log in to the Clever Cloud console
- Click on "Create" and select "An application"
- Choose ".NET" as the runtime environment
- Configure your application settings (name, region, etc.)
- Add the following environment variables:
ASPNETCORE_URLS="http://0.0.0.0:8080"
CC_CACHE_DEPENDENCIES="true"
CC_DOTNET_VERSION="8.0"
- Deploy using Git:
git remote add clever git+ssh://git@push-par-clevercloud-customers.services.clever-cloud.com/app_<your-app-id>.git
git push clever main:masterInstall the Clever Tools CLI following the official documentation:
# Using npm
npm install -g clever-tools
# Or using Homebrew (macOS)
brew install clever-toolsclever loginclever create --type dotnet <YOUR_APP_NAME>
clever env set ASPNETCORE_URLS "http://0.0.0.0:8080"
clever env set CC_CACHE_DEPENDENCIES "true"
clever env set CC_DOTNET_VERSION "8.0"clever deployclever open- Web Console: The Clever Cloud console provides logs, metrics, and other tools to manage your application.
- CLI: Use
clever logsto view application logs andclever statusto check the status of your application.
Use the following commands:
dotnet new blazor -n MyBlazorApp
cd MyBlazorApp
dotnet publish -c Release MyBlazorApp.csprojSee your app on localhost with dotnet bin/Release/net8.0/publish/MyBlazorApp.dll
Happy deployments ✌️