ineternet / SocialNetwork

Social media site for Blazor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

(Optional) Create a static class in namespace SocialModel and write to SocialModel.DataSeed in a static constructor to provide seed data

namespace SocialModel;

internal static partial class DataSeed
{
  static DataSeed()
  {
	  DataSeed.Users = x => x.HasData(new User() { ... });
	  DataSeed.Posts = x => x.HasData(new Post() { ... });
  }
}

Create the initial migration - it will be applied on startup

dotnet ef migrations add CreateFromRelease

Create a folder and provide a PKCS12 certificate cert.pfx that will be used for the website. If the certificate requires a password then this can be supplied in the appsettings.json.

mkdir ssl
cp /certs/website.pfx ./ssl/cert.pfx

Create an .env file and provide the neccessary variables:

SQL_SA_PASSWORD="Sa_user_Pwd_1234"
SSL_DIR="./ssl"

Run as docker compose, or without docker: Set the SQL_CONNSTR environment variable to a SQL Server connection string and run the SocialSite project.

About

Social media site for Blazor

License:GNU General Public License v3.0


Languages

Language:C# 66.9%Language:HTML 19.8%Language:CSS 12.7%Language:Dockerfile 0.7%