Skip to content

Commit

Permalink
deploy: add README.md with example command for configuring envs
Browse files Browse the repository at this point in the history
  • Loading branch information
digorgonzola committed Dec 11, 2023
1 parent 9f54ab9 commit 8607d9a
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
18 changes: 18 additions & 0 deletions deploy/github/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Github Deployments
Deployment of this application uses [Github Deployment Environments](https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment).

A successful deployment relies on the correct variables being defined in order to deploy to the correct AWS account etc.

### Managing Environments
You can view the current environment settings by visiting https://github.com/aodn/sample-django-app/settings/environments.

You can view the currently defined variables there or from the cli using:
```bash
gh variable list -R aodn/sample-django-app -e staging
```

#### Updating Variables
Manually updating vars can be tedious and error-prone. Instead, you may define the variables you need as a .env file and push these values:
```bash
gh variable set -R aodn/sample-django-app -e staging -f staging.env
```
11 changes: 11 additions & 0 deletions deploy/github/production.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
ALB_PARAMETER_NAME=shared-alb-devops-sydney
APP_NAME=sample-django-app
AWS_ACCOUNT_ID=450356697252
AWS_REGION=ap-southeast-2
DB_NAME=api_prod
DB_USER=prod
ECR_PARAMETER_NAME=api
ECR_REGISTRY=450356697252.dkr.ecr.ap-southeast-2.amazonaws.com
ECR_REPOSITORY=api
ENVIRONMENT=production
RDS_PARAMETER_NAME=stefan-db/primary/evaluation
9 changes: 9 additions & 0 deletions deploy/github/staging.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
ALB_PARAMETER_NAME=shared-alb-devops-sydney
APP_NAME=sample-django-app
AWS_ACCOUNT_ID=450356697252
AWS_REGION=ap-southeast-2
ECR_PARAMETER_NAME=api
ECR_REGISTRY=450356697252.dkr.ecr.ap-southeast-2.amazonaws.com
ECR_REPOSITORY=api
ENVIRONMENT=staging
RDS_PARAMETER_NAME=stefan-db/primary/evaluation

0 comments on commit 8607d9a

Please sign in to comment.