Skip to content

nullstone-io/aspnet-quickstart

Repository files navigation

ASP.NET Quickstart

This is an ASP.NET Core Web App Quickstart for Nullstone. This is based off the official ASP.NET Core get started tutorial.

This quickstart is set up with:

  • ASP.NET Core 6
  • HTTPS disabled (handled by AWS infrastructure)

How to launch via Nullstone

  1. Create a public web app. (Remember app-name for later)
  2. Add a subdomain. (this will add a Load Balancer capability)
  3. Provision
nullstone up --wait --block=<app-name> --env=<env-name> --var=service_port=9000
  1. Build, push, and deploy
docker build -t aspnet-quickstart .
nullstone launch --source=aspnet-quickstart --app=<app-name> --env=<env-name>

Running locally

You can run this project locally inside Docker or using a dev server. The docker setup is configured to hot reload; you don't have to rebuild/restart the container when you change code.

Docker

docker compose up

Visit http://localhost:5001.

Dev Server

dotnet watch run

Visit http://localhost:5192.

Hot reload

The app in docker-compose.yml is configured to automatically reload changes to code. You do not need to rebuild/restart the app when making changes to code.

Update dependencies

To make changes to dependencies, make changes to your project and restart your docker container. dotnet restore happens automatically at the boot of the docker container to update dependencies.

docker compose restart app

Details on quickstart

This web app was generated following these steps.

  1. dotnet new webapp --no-https -o .
  2. dotnet new gitignore