Steps:
- build solution
- install docker
- after instaling switch to Windows containers
- open cmd in the folder with docker file and create docker image
docker build -t your_image_name .
- run docker container based on the previously created image
docker run -p 27017:27017 --name your_container_name your_image_name
- run Potestas.App.Terminal project
links: https://www.scalyr.com/blog/create-docker-image/ https://docs.docker.com/engine/reference/commandline/run/
Steps:
- build solution
- download mongodb
- after downloading the archive package, unpack it into the folder C:\mongodb
- create folders: C:\data\db
- run MongoDB server: open cmd and enter
cd C:\mongodb\bin
after entermongod
- replace connectionString="mongodb://host.docker.internal:27017/observation" to the connectionString="mongodb://localhost/observation" in the Potestas.Apps.Terminal/App.config file
- run Potestas.App.Terminal project
- in cmd go to the folder .NET.Mentoring.L1/Potestas/Potestas.API and enter
dotnet run
after open in browser http://localhost:5000/swagger/index.html for testing or use Postman
- in cmd go to the folder .NET.Mentoring.L1/Potestas/Potestas.API and enter
dotnet run
- in Visual Studio (or VS Code :) ) run Potestas.Apps.Terminal project