Deploy Blazor on Light Cloud - a .NET container on port 8080, with Kestrel bound to the routed port and configuration from environment variables.
Deploy Blazor
Blazor is detected from your project files and runs as a .NET container on port 8080. No Dockerfile needed - one is generated unless the repo has its own.
Serve it#
Kestrel must listen on the routed port on all interfaces. ASP.NET Core reads the standard variables - set nothing and the platform's PORT works via the generated setup, or be explicit:
ASPNETCORE_URLS=http://0.0.0.0:8080
Configuration#
Containers receive environment variables at runtime, and ASP.NET Core's configuration system maps them as usual - ConnectionStrings__Default style double-underscore keys included. ASPNETCORE_ENVIRONMENT=Production is the conventional baseline.
Database#
Provision managed PostgreSQL or MySQL and feed the connection details to EF Core or your data layer from the environment - the Credentials tab has every field. Run EF migrations at startup or from your laptop against the same endpoint.
Which Blazor?#
- Blazor Server / interactive server rendering - this page: a running container, under normal scaling. Server interactivity holds a connection per client, so size concurrency accordingly.
- Blazor WebAssembly, standalone - a static build: publish output is files, served from the CDN. Deploy it as a static site with the output directory pointed at the published
wwwroot.