- (If not done before) Run the CreateDB script with Docker running.
.\CreateDB.{ps1,sh}
- Run the Server Project
- Use your IDE or
dotnet run --project .\MiniTwit\MiniTwit\Server
- Go to your browser and open
localhost:7089
(This does not fully work yet and needs to be changed)
- Make a trusted certificate and output it to a known location.
dotnet dev-certs https -ep <path to output?> -p <a strong password> --trust
- Add the password of the certificate to user-secrets
dotnet user-secrets set "Kestrel:Certificates:Development:Password" "$connectionString" --project <path to server>
- Publish the Docker image
dotnet publish .\MiniTwit\Server\ --os linux --arch x64 -c Release -p:PublishProfile=DefaultContainer --no-self-contained
- Run the container
dotnet run -it --rm minitwit-server:1.0.0
This currently requires a person to do something, but would be updated to run from a script, how to do it using actions is unclear.
- Make a droplet with docker support
- SSH to the droplet and run
docker run --name MiniTwit-db -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=<our strong password>" -p 1433:1433 -d mcr.microsoft.com/azure-sql-edge:latest
- Update the database with the dbcontext, by having the connection string to the database in user secrets and running
dotnet ef database update -p ./MiniTwit/Server/
this should be changed.