This repository is an example of microservices and chat bots usage.
Application allows to track parcels of two major transporatation companies in Ukraine.
I use Cake to build the project.
Run build.ps1
on Windows or build.sh
on Linux to build the projects and create Docker containers.
If you plan to push your containers to a repository use DockerPush
task.
Cake process docker-compose.template.yml
file and creates docker-compose.yml
which you can use to rune the project.
Define all necessary environment variables in you docker-compose.yml
file and use docker-compose up
or docker stack deploy
commands: docker-compose up, docker stack deploy
Application logs are sent to Exceptionless service and any MongoDb database.
You will need to provide Exceptionless API key and MongoDb connection string to enable logging.
Transporation companies API access implemented with UkrTrackingBot.ApiWrapper.DeliveryAuto
and UkrTrackingBot.ApiWrapper.NovaPoshta
projects.
You will need to obtain API keys for using tracking API.
You can do this here:
Telegram chat bots API support 2 ways of getting updates:
- long polling:
UkrTrackingBot.Telegram.Console
project - webhooks:
UkrTrackingBot.Telegram.Web
project
You will need to create your bot and supply bot token into application.
Solution contains web frontend project UkrTrackingBot.Web
.
UkrTrackingBot.IdentityServer
project is an IdentityServer4 host. You will need to generate a pfx
sertificate to use it.
Nginx is used as a reverse proxy. Letsencrypt certificates generated on server startup.
Redis is used to cache tracking API results.
CleanDocker.ps1
script removes all containers and images from your local Docker.PublishAll.ps1
script publishes all projects to local directories.