bharney / JSStarterDocker

.Net Core 2.1 C# with React Starter Project that provides Identity Authentication and Authorization using JWT. Based on .NET Core JavaScriptServices Spa React + Redux using TypeScript. Additional support available for Docker and ARM Templating. Project uses Key Vault for secrets and EntityFrameworkCore to migrate Identity tables.
https://jsstarter.azurewebsites.net
17 stars 3 forks source link
arm-templates aspnet-core csharp docker docker-compose dotnet-core javascript keyvault react reactjs redux ssr typescript

StarterPack

This Starter template allows you to spin up a React/Redux and .Net Core application with SQL Server and .Net Core Identity Authentication/Authroization. The site takes advantage of Server-Side Rendering and Lazy Loading based on Routes. Authentication is built into the App with JWT and Authorize attributes on controllers.

Technology Stack

Setup Dependencies/ Requirements

Switch out the values in appsettings.json with your own seed account.

 {
  "Logging": {
    "IncludeScopes": false,
    "Debug": {
      "LogLevel": {
        "Default": "Warning"
      }
    }
  },
  "Console": {
    "LogLevel": {
      "Default": "Warning"
    }
  },
  "BlobService": {
    "StorageUrl": "https://jsstarter.blob.core.windows.net/"
  },
  "ConnectionStrings": {
    "LocalConnection": "Server=db;Database=master;User=sa;Password=[PASSWORD];"
  },
  "Token": {
    "Issuer": "https://jsstarter.azurewebsites.net",
    "Key": "[TOKEN_KEY]"
  },
  "SeedAccount": {
    "UserName": "[ADMIN_EMAIL]",
    "Password": "[PASSWORD]"
  }
}

Run Project with Docker

docker-compose -f ".\docker-compose.yml" -f ".\docker-compose.override.yml" build

This will build two docker containers. One for the web application, and another for the SQL server database. The database will be seeded with a starting Admin Account to login with.

Run Project

Set Environment in PowerShell

Road Map

I am working to split this template into repos the correspond to the ARM templating. That is one that spins up Azure Resources needed for Docker, and one that spins up more of a classic application without docker