Skip to content

Prerequisite

Install Docker

Make sure you have the latest version of Docker 🐳 installed on your local machine.

Secrets setup

Placing secret values in files is a common pattern to provide sensitive configuration to an application. A secret file follows the same principal as a .env file except it only contains a single value and the file name is used as the key.

A secret file will look like the following:

/var/run/database_password:

super_secret_database_password

Here we create secret files under the secret directories (config/secrets/<env>/) and place secret values into the files.

You can also set up environment variables directly.
The variables you set in this way would take precedence over those loaded from a secret file.

For more info, check the pydantic official document.

Set up Report Queue with Amazon SQS

  1. Create an AWS account and an IAM user (Ref).
  2. Create AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY under config/secrets/<env>/ with the generated credentials (or just setting environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY).
  3. Select a region where FIFO Queues are available (e.g. us-east-1, see here for more info), then creating AWS_REGION under config/secrets/<env>/ with the region name (or just setting the environment variable AWS_REGION).
  4. Create a FIFO Amazon SQS queue (Ref).
    • Notice that the name of a FIFO queue must end with the .fifo suffix.
  5. Create REPORT_QUEUE under config/secrets/<env>/ with the created queue's name (or just setting the environment variable REPORT_QUEUE).

Set up Slack Webhook URL

  1. Follow this tutorial to create a Slack App and get your Webhook URL.
  2. Create SLACK_WEBHOOK_URL under config/secrets/<env>/ with the webhook url (or just setting the environment variable SLACK_WEBHOOK_URL).