In powershell: $env:ASPNETCORE_ENVIRONMENT = "Production" Delete Migrations folders and databases dotnet ef migrations add "MySQL Initial" -p Infrastructure -s API -c BrainContext -o Data/Migrations dotnet ef migrations add "MySQL Identity Initial" -p Infrastructure -s API -c AppIdentityDbContext -o Identity/Migrations
ng build dotnet clean dotnet build --configuration Release dotnet publish -c Release -o publish Typerrorists.sln
command >reload deploy reload package
$env:ASPNETCORE_ENVIRONMENT = "Development"
Go to digitalocean droplet console and enter ls /var/typerrorists/ to check if deployment successful
sudo nano /etc/apache2/sites-available/typerrorists.conf Add required contents to file then
sudo nano /etc/systemd/system/typerrorists-web.service Add required contents to file then sudo systemctl enable typerrorists-web.service Then start service sudo systemctl start typerrorists-web.service sudo systemctl status typerrorists-web.service
sudo systemctl restart typerrorists-web.service
sudo systemctl stop typerrorists-web.service sudo systemctl disable typerrorists-web.service
sudo certbot --apache -d typerrorists.oceancsoftware.cloud
sudo journalctl -u typerrorists-web.service --since "1 minute ago"
dotnet ef migrations add InitialCreate -p Infrastructure -s API -o Data/Migrations -c BrainContext dotnet ef migrations add IdentityInitial -p Infrastructure -s API -o Identity/Migrations -c AppIdentityDbContext