Useful for App Services based on Container / Docker
- create Azure Function App (with Hosting Plan: Consumption)
- in Azure Function App add:
- Application settings:
WEBSITE_NODE_DEFAULT_VERSION
=8.10.0
OPENSSL_PATH
=D:\Program Files (x86)\Git\usr\bin\openssl.exe
TEST
=false
- Connection strings (with type Custom):
CLIENT_ID
= How to get client id & secret »CLIENT_SECRET
= How to get client id & secret »SUBSCRIPTION_ID
= Azure AD > Subscriptions > Subscription IDTENANT
= Azure AD > Azure Active Directory > Properties > Directory IDPFX_PASSWORD
= Random passwordAZURE_STORAGE_CONNECTION_STRING
= Connection string to any storage for Let's Encrypt challengesAZURE_STORAGE_CONTAINER
= Container name in storage for Let's Encrypt challenges
- Application settings:
- in Azure Function App create function from template: Timer trigger / Javascript (named: TimerTriggerJS1)
- copy wwwroot to Azure Function App wwwroot
- run
npm install
in wwwroot - change parameters in file index.js for your App Service
- in your app add redirect from path
/.well-known/acme-challenge/:key
tohttps://«storage_name».blob.core.windows.net/«storage_container»/:key
(example for: expressjs) - run TimerTriggerJS1 function