- Select your new resource group and Container Apps Environment
- Be sure to select the correct repository and image name.
- The image tag is not important, as we will specific a dynamic git commit in the deployment workflow.
Recommended settings:
- Ingress should be enabled and Accepting traffic from anywhere
- Ingress type: HTTP
- Client certificate mode: Ignore
- Transport: Auto
- Insecure connections: false
- Target port: 3000
- Session affinity: false
Configure continuous integration:
- Sign-in with your Github credentials, allowing Azure to access the repository and store required secrets
- Select the correct Organization, Repository and Branch to match your own fork.
- Configure Registry settings to match your new Docker image repository.
- Azure access:
- Important: as of this writing, User-assigned identity does NOT work with Github Action secrets. Instead, select Service Principal.
- Click "Start continuous deployment"
- This will generate and commit a new Github Action workflow file in the
.github
folder of your code repository. - Unfortunately, the template used is out of date and needs to be manually updated in a separate commit. We'll fix this in the last step.
- This will generate and commit a new Github Action workflow file in the
- Under "Environments", add a suitable environment name, ex. "prod-slack-"
In your Supabase project settings area, under "API", locate your ANON KEY and project url. You will use these values in the next step.
Under "Secrets and variables" > "Actions", add the following variables for each environment:
- SLACK_APP_SUPABASE_ANON_KEY
You will note that there are some existing secrets under "Repository secrets", created for you by the Azure Container App CI setup wizard. You shouldn't need to modify these, except to cleanup any removed Container Apps.
Still under "Secrets and variables", click "Variables".
Add the listed repository variables first, adjusting the values as desired. These values serve as a useful default for all environments, reducing the number of environment variables to maintain.
Finally, add environment specific variable values for each repository variable you want to override the default value of. Typical examples include:
- SLACK_APP_SUPABASE_API_URL
- TYPESENSE_DOCS_COLLECTION
- TYPESENSE_DOCS_SEARCH_PHRASE_COLLECTION
Add the following secrets to the container app using the Azure portal:
You will find your Slack secrets in the Slack app configuration UI.
See workflows in the .github
folder for working examples.
Adjust the generated workflow file to be similar to one of the working examples, substituting the correct environment name where applicable.
Confirm that Github action for build-and-deploy is successful.
By default, your Container app will scale to zero instances. For environments with sporadic usage, this can be acceptable. However, for most test and production environments, this will cause an unacceptable delay for Slack users.
We recommend changing the scale configuration to a minimum of 1 instance, to avoid latency due to cold start.
For development and test environments, we recommend Revision mode: Single.
For production environments, we recommend Revision mode: Multiple, as it makes it much easier to rollback to a known good container instance, should there be problems with a deploy.