Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jeffhollan/aca-minimal-api
.NET Minimal API with steps on how to publish to Azure Container Apps
https://github.com/jeffhollan/aca-minimal-api
Last synced: 3 days ago
JSON representation
.NET Minimal API with steps on how to publish to Azure Container Apps
- Host: GitHub
- URL: https://github.com/jeffhollan/aca-minimal-api
- Owner: jeffhollan
- Created: 2021-12-10T22:06:43.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-02-08T05:30:57.000Z (almost 3 years ago)
- Last Synced: 2025-01-23T00:45:07.359Z (4 days ago)
- Language: C#
- Size: 19.5 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Azure Container Apps .NET Minimal API
The following sample contains a simple .NET 6 minimal API.
It also contains a `Dockerfile` to build a valid .NET 6 docker container.
You can build and publish this container with `docker build -t /: .` and then `docker push ...` to push to a registry.
Then deploy to Azure Container Apps with a command line like the following (assumes an [Azure Container App environment]() has already been created for the $ACA_ENVIRONMENT property):
```bash
az containerapp create \
--name minimal-api \
--resource-group $RESOURCE_GROUP \
--environment $ACA_ENVIRONMENT \
--image ghcr.io/jeffhollan/aca-minimal-api/app:main \
--ingress 'external' \
--target-port 80 \
--query configuration.ingress.fqdn
```#### Debug locally
After cloning and opening locally, you can run with:
```bash
dotnet run
```