Everytime I setup a new project, besides consideration on if I need microservice architecture or a good old monolithic application there are always simliar steps needed to get the project in a maintainable state.
Regardless of the architecture, anything new needs to run in a container. This is just defacto now days. I built a simple demo a few years back which is still relavant.
Today I’d add that compose locally should bring up a containerised local environment for everything your application needs to run.
- containerised database
- stubs of downstream internal dependencies, you can use tooling like wiremocks (.Net), Express (Node) or a simple JSON Server
- stubs of external dependencies, example AWS Localstack
- stubs of your authorisation service
This should be run from one file like
Run_Local.ps1, below is an example.
We want all members of the team rowing in the same direction. As there are many IDEs (Visual Studio, Ryder ect) the simplest way is to commit a
.editorconfig file with the source control. Check out https://editorconfig.org/
root = true
You have more than one option!
Its important to understand that sonarscanner doesnt run tests, it reports on static code and can be provided test coverage reports.
Run your own containerised Sonarqube server locally.
Although many large IT companies have a sonar server which can be used a a quality gate in PRs and Master builds its possible to do these checks locally.
Unit Test code coverage
- App Insights
- CI/CD pipeline for build & tests