Very basic API rest for kubernetes demo purposes
NOTE: This image has been pushed to https://hub.docker.com/r/enriquecatala/fastapi-helloworld
Check your api documentation
Test your methods: Navigate to IP:PORT(/one/hello | /two/hello) For example:
No special setup required, but the container will return the HELLOWORLD_ENV in the output call. You can edit that variable to check values
If you wanto to deploy, here you have a deployment example. Please change this accordingly:
env:
- name: HELLOWORLD_ENV
value: "Pon aqui lo que te de la gana :)"
In case you are using docker-compose.yml
environment:
- HELLOWORLD_ENV=Pon aqui lo que te de la gana :)
docker-compose build
docker-compose up
Just push :)
First of all, you need to create a new repository in GitHub. Then you need to create a service principal in Azure. For example:
az ad sp create-for-rbac --name "github-actions-financeai-dev" --role contributor --scopes "/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCE_GROUP>" --sdk-auth
With the output, just create this Azure credential for GitHub Actions:
{
"clientId": "<client id>",
"clientSecret": "<client secret>",
"subscriptionId": "<subscription id>",
"tenantId": "<tenant id>",
"activeDirectoryEndpointUrl": "https://login.microsoftonline.com",
"resourceManagerEndpointUrl": "https://management.azure.com/",
"activeDirectoryGraphResourceId": "https://graph.windows.net/",
"sqlManagementEndpointUrl": "https://management.core.windows.net:8443/",
"galleryEndpointUrl": "https://gallery.azure.com/",
"managementEndpointUrl": "https://management.core.windows.net/"
}