Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thiagobarradas/dotnet-core-webapi-with-docker-demo
ASP.NET Core Web API Demo with Docker, Nancy and Kestrel.
https://github.com/thiagobarradas/dotnet-core-webapi-with-docker-demo
api appveyor demo docker dotnet dotnetcore kestrel nancy webapi
Last synced: 3 days ago
JSON representation
ASP.NET Core Web API Demo with Docker, Nancy and Kestrel.
- Host: GitHub
- URL: https://github.com/thiagobarradas/dotnet-core-webapi-with-docker-demo
- Owner: ThiagoBarradas
- Created: 2017-06-24T04:31:36.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-08-03T19:56:57.000Z (over 2 years ago)
- Last Synced: 2023-03-01T17:22:36.744Z (over 1 year ago)
- Topics: api, appveyor, demo, docker, dotnet, dotnetcore, kestrel, nancy, webapi
- Language: C#
- Homepage:
- Size: 16.6 KB
- Stars: 3
- Watchers: 2
- Forks: 10
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DotNetCore.WebApi.Docker.Demo
[ASP.NET Core](https://www.microsoft.com/net/core "ASP.NET Core") Web API Demo with [Docker](https://docs.docker.com/ "Docker"), [Nancy](http://nancyfx.org/ "Nancy") and [Kestrel](https://github.com/aspnet/KestrelHttpServer "Kestrel").
# How to run project?
First head into the `DotNetCore.WebApi.Docker.Demo` folder and then build a release version with the following commands.
```sh
cd DotNetCore.WebApi.Docker.Demo
dotnet build --configuration Release
```After that, head back in the root of the project, then start running with docker (your terminal must be in same directory that the DockerFile):
```
cd ..
docker build -t dotnetapidemo . --no-cache
docker run -t -p 1234:5000 dotnetapidemo
```First line builds app and sets image name to *dotnetapidemo* (you can change). The next line run app in a container exposing your port 5000 in port 1234 (you can change too).
To check if app is running, access `http://localhost:1234/test`. You should see something like:
```
{"message":"This is a simple test"}
```# Build Status
[![Build status](https://ci.appveyor.com/api/projects/status/4wrul3qj9iyv0pwh?svg=true)](https://ci.appveyor.com/project/ThiagoBarradas/dotnetcore-webapi-docker-demo)
# Author
[Thiago Barradas](https://www.linkedin.com/in/thiagobarradas "Linkedin")