This API was developed primarily for an interview process. The corresponding instructions can be found here. I also wrote some specifications
The cached version is the one chosen from production because of Heroku deployment, but the Cassandra version would be a better choice for a real production environment.
Download and install the .NET Core SDK from .NET Downloads.
$ export ASPNETCORE_ENVIRONMENT=Production
$ dotnet run --project src/UserInfo.Api/UserInfo.Api.csproj
$ docker run -p 9042:9042 --name mk-cassandra -d cassandra:latest
$ export ASPNETCORE_ENVIRONMENT=local
$ dotnet run --project src/UserInfo.Api/UserInfo.Api.csproj
$ docker build -t mk .
$ docker run --rm -it -p 5000:5000 -e ASPNETCORE_ENVIRONMENT="Production" mk
$ docker run -p 9042:9042 --name mk-cassandra -d cassandra:latest
$ docker build -t mk .
$ docker run --rm -it -d -p 5000:5000 -e ASPNETCORE_ENVIRONMENT="docker" --link mk-cassandra:cassandra mk
Install Docker
docker build -t mk .
# Be sure to have a heroku account, that the app is created there, and that you have Heroku CLI installed.
# 'mk-bettym' is the name of the heroku app
heroku login
heroku container:login
docker tag mk registry.heroku.com/mk-bettym/web
heroku container:push web -a mk-bettym
# OR docker push registry.heroku.com/mk-bettym/web
heroku container:release web -a mk-bettym
Re-Release quickly:
docker build -t mk .
heroku container:push web -a mk-bettym
heroku container:release web -a mk-bettym
-
Local version
-
Heroku version