This Application expects 3 Environment Variables
RedisUser
RedisPassword
RedisEndpoint = Domain/Ip/Alias:Port
You can start the application with the docker-compose file.
It will bind the port 54321 (container) to your 9999 Port.
You can then access the page via http://localhost:9999/swagger/index.html
Github Code Repo: https://github.com/Ephaltes/12FactorApp
One CodeBase and it is hosted on github via git. has a main and a dev branch
All dependencies are in the TwelveFactorApp.Api.csproj When Building the dependencies will be downloaded from nuget and builded and will be added to the builded files.
So no dependencies are needed on the host except .NET 6
Config for Redis Database is used from Environment Variable (for use see above)
Redis Caching Database (It writes a log Entry when writing something into the Redis Cache)
Github Builds when commiting to the Main (via PullRequest) then Releases that to dockerHub where you can download and run it.
The Build & Release (Upload to dockerhub) are separated github jobs
The Cached Data is stored in a Redis Database --> Stateless a second instant could be started and would have access to the same data
The API is binding to port 54321 so that you can configure how it will be accessed
Implemented a "Placeholder" Code which can be used for Grace Shutdown (program.cs)
All Codebase in one github repo, local dev --> dev-Branch --> Pull Request into Main Branch so that they all have similar code basis.
Logs are written to STDOUT so you can access them via docker logs or with a docker logs driver