Skip to content

Latest commit

 

History

History

LetsEncryptWeb

Let's Encrypt Web Api sample

The second letter in the Hebrew alphabet is the ב bet/beit. Its meaning is "house". In the ancient pictographic Hebrew it was a symbol resembling a tent on a landscape.

Summary

buymeacoffee

Give a Star! ⭐

If you like or are using this project to learn or start your solution, please give it a star. Thanks!

This AspNetCore project is an example usage for Bet.AspNetCore.LetsEncrypt with Azure Container Instances.

This sample project is hosted in the Azure Container Services and accessible:

http://betacme.kingdavidconsulting.com/weatherforecast

https://betacme.kingdavidconsulting.com/weatherforecast

The required Azure Components

  • Azure Blob Storage - Used to store Acme Account and Certificate
  • Azure Key Vault - Used to store secrets
  • Managed Identity is used to access resources from Azure Container Services

Azure Container Services Deployment Sample Template

#------------------------------------------------------------------------------------------------------------------
#
# SOURCE: https://docs.microsoft.com/en-gb/azure/container-instances/container-instances-multi-container-yaml
#
# DEPLOY: az container create --resource-group {resourceGroupName} --file acme-deploy.yml
#
# VIEW DEPLOY STATE:  az container show --resource-group {resourceGroupName} --name betAcmeContainerGroup --output table
#
# DELETE DEPLOYMENT:  az container delete --resource-group {resourceGroupName} --name betAcmeContainerGroup
#------------------------------------------------------------------------------------------------------------------
apiVersion: 2018-10-01
location: centralus
name: betAcmeContainerGroup
properties:
  containers:
  - name: bet-acme
    properties:
      environmentVariables: []
      image: kdcllc/bet:letsencrypt
      resources:
        requests:
          cpu: 1
          memoryInGb: 0.2
      ports:
      - port: 80
      - port: 443
      environmentVariables:
      - name: ASPNETCORE_URLS
        value: "http://+:80;https://+:443"
      - name: ASPNETCORE_ENVIRONMENT
        value: "Production"
  osType: Linux

  ipAddress:
    type: Public
    ports:
    - protocol: tcp
      port: '80'
    - protocol: tcp
      port: '443'
    dnsNameLabel: betacme

identity:
    type: UserAssigned
    userAssignedIdentities:
      {'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managedIdentityName}':{}}
tags: null

type: Microsoft.ContainerInstance/containerGroups