This repo contains a case task for Genesis Engineering School 2022. The solution can:
- Fetch BTC to UAH exchange rate from https://coinbase.com
- Subscribe and notification functionality
- Send email notifications with actual exchange rate
IMPORTANT: To run the solution without any minipulations with external API tokens use already build image from the GitHub Container registry. Genesis case task image: https://ghcr.io/bardin08/genesis-case-task;
- Installed .NET 6 SDK
- Installed Docker
For this method you need only Docker installed.
-
Pull docker image from the GitHub container registry
$ docker pull ghcr.io/bardin08/genesis-case-task:latest
This will pull the docker image with all tokens and secrets settled.
-
Run pulled image locally
$ docker run -p <YOUR_LOCAL_PORT>:80 ghcr.io/bardin08/genesis-case-task:latest
By default, the container is running in
Development
mode and has a swagger UI at theswagger/index.html
endpoint. To run the container in any other mode overrideASPNETCORE_ENVIRONMENT
variable with--env
flag. -
Open
localhost:<YOUR_LOCAL_PORT>/swagger
and enjoy the app!
-
Clone the repository
-
Set real values instead of ${} and ${} in appsettings.json
In case of using gmail account DO NOT PASS gmail account's password. You need to generate an applications password. More detailes here: https://stackoverflow.com/a/32457468/13255956
-
Build docker image with a command
$ docker build -t genesis-case-task:latest .
-
Run built image with a command
$ docker run -p <YOUR_LOCAL_PORT>:80 genesis-case-task:latest
By default, the container is running in
Development
mode and has a swagger UI at theswagger/index.html
endpoint. To run the container in any other mode override `ASPNETCORE_ENVIRc -
Open
localhost:<YOUR_LOCAL_PORT>/swagger
and enjoy the app!
- Use tasks schedulers to send emails by timespans
- Use another serializer to reduce files size. For example, MsgPack or binary