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.
Create GitHub API personal access token¶
- Generate token here.
- Create
GH_TOKENunderconfig/secrets/<env>/with the generated token (or just setting the environment variableGH_TOKEN).
Set up Amazon SQS¶
- Create an AWS account and an IAM user (Ref).
- Create
AWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEYunderconfig/secrets/<env>/with the generated credentials (or just setting environment variablesAWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEY). - Select a region where FIFO Queues are available (e.g.
us-east-1, see here for more info), then creatingAWS_REGIONunderconfig/secrets/<env>/with the region name (or just setting the environment variableAWS_REGION). - Create a FIFO Amazon SQS queue (Ref).
- Notice that the name of a FIFO queue must end with the
.fifosuffix.
- Notice that the name of a FIFO queue must end with the
- Create
CLONE_QUEUEunderconfig/secrets/<env>/with the created queue's name (or just setting the environment variableCLONE_QUEUE). - Create another FIFO Amazon SQS queue, and then create
REPORT_QUEUEunderconfig/secrets/<env>/with the created queue's name (or just setting the environment variableREPORT_QUEUE).- Not needed for test environment.