{"id":19792833,"url":"https://github.com/devpro/dotnet-webapi-all-automated","last_synced_at":"2025-05-01T02:30:32.688Z","repository":{"id":47828672,"uuid":"395102386","full_name":"devpro/dotnet-webapi-all-automated","owner":"devpro","description":"Example of a .NET web API with all needed automation","archived":true,"fork":false,"pushed_at":"2021-08-12T17:00:46.000Z","size":25,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-28T15:29:17.127Z","etag":null,"topics":["automation","docker","dotnet5","rest-api"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devpro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-11T19:56:48.000Z","updated_at":"2023-05-22T19:50:56.000Z","dependencies_parsed_at":"2022-07-24T21:17:05.066Z","dependency_job_id":null,"html_url":"https://github.com/devpro/dotnet-webapi-all-automated","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devpro%2Fdotnet-webapi-all-automated","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devpro%2Fdotnet-webapi-all-automated/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devpro%2Fdotnet-webapi-all-automated/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devpro%2Fdotnet-webapi-all-automated/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devpro","download_url":"https://codeload.github.com/devpro/dotnet-webapi-all-automated/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251812242,"owners_count":21647870,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","docker","dotnet5","rest-api"],"created_at":"2024-11-12T07:08:05.630Z","updated_at":"2025-05-01T02:30:32.440Z","avatar_url":"https://github.com/devpro.png","language":"C#","readme":"# .NET web API all automated\n\nThis repository provides a fully working example of a .NET web API with all needed automation.\n\n## Design\n\n### Projects\n\nName | Technology stack | Role\n---- | ---------------- | ----\n`WebApi` | ASP.NET 5.0 | Web application providing the REST API\n`WebApi.Dto` | .NET 5.0 | Library providing definitions for Data Transfer Objects (DTO)\n\n### Open topics\n\n* Health check in docker compose definition\n* Kubernetes definition (with Helm chart)\n* InMemory database (with associated integration testing) and switch to async actions\n* OpenTelemetry\n* Tekton\n* Keptn\n* Argo\n* MongoDB\n\n## Quickstart\n\n* Make sure all requirements are met: [setup guide](./docs/setup-guide.md)\n\n## Development\n\n### How to build\n\n* From the command line\n\n```bash\ndotnet build\n```\n\n### How to test\n\n* From the command line\n\n```bash\ndotnet test\n```\n\n### How to run\n\n* From the command line\n\n```bash\ndotnet run --project src/WebApi\n```\n\n* Check application's health\n\n```bash\ncurl -k https://localhost:5001/health\n```\n\n* Use Swagger web UI: open [localhost:5001/swagger](https://localhost:5001/swagger) in a browser\n\n### How to run containers\n\n* Edit manually the host file of the system (on Windows: `C:\\Windows\\System32\\drivers\\etc\\hosts`) to add the following line\n\n```ini\n127.0.0.1 webapi.localhost\n```\n\n* From the command line\n\n```bash\n# create image\ndocker-compose -f docker-compose.dev.yml build\n\n# create containers\ndocker-compose -f docker-compose.dev.yml up -d\n\n# scale up or down\ndocker-compose -f docker-compose.dev.yml up -d --scale webapi=3\n\n# shutdown\ndocker-compose -f docker-compose.dev.yml down\n```\n\n* Open [webapi.localhost:8000/swagger](http://webapi.localhost:8000/swagger) in the browser\n\n## Operation\n\n### How to create Docker images\n\n* From the command line (replace `devprofr` with the container registry name)\n\n```bash\ndocker build . -t devprofr/allautomateddotnetwebapi -f src/WebApi/Dockerfile --no-cache\n```\n\n### How to setup an environment\n\n* Review `docker-compose.yml` to match your need (container registry, ASP.NET configuration from environment variables, reverse proxy)\n\n* Edit manually the host file of the system to add the following line\n\n```ini\n127.0.0.1 webapi.localhost\n```\n\n* From the command line\n\n```bash\n# create containers\ndocker-compose up -d\n\n# scale up or down\ndocker-compose up -d --scale webapi=3\n\n# shutdown\ndocker-compose down\n```\n\n* Open [webapi.localhost:8000/health](http://webapi.localhost:8000/health) in the browser\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevpro%2Fdotnet-webapi-all-automated","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevpro%2Fdotnet-webapi-all-automated","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevpro%2Fdotnet-webapi-all-automated/lists"}