Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
DEBUG=TRUE
SECRET_KEY=12345678
ALLOWED_HOSTS='localhost 127.0.0.1'
DB_SECRET={"dbClusterIdentifier":"none","password":"secret","dbname":"accessibility_monitoring_app","engine":"postgres","port":5432,"host":"localhost","username":"admin"}
DB_NAME=amp-app-2-prod-env-addonsstac-reportstoragebucket-ieda2c374sq7
TERRAFORM=TRUE
DB_HOST=localhost
DB_NAME=accessibility_monitoring_app
DB_USER=admin
BUCKET_NAME=amp-app-prod-env-prod-env-files
DB_PASSWORD={"username": "admin", "password": "secret"}

SMOKE_TESTS_USERNAME=
SMOKE_TESTS_PASSWORD=
3 changes: 2 additions & 1 deletion .github/workflows/deploy-to-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:

- name: Backup databases
run: |
python terraform_stack/terraform_deploy/terraform_deployment.py --environment prod --function exec --command "python aws_tools/dump_rds_to_s3_as_sql.py" && \
python terraform_stack/terraform_deploy/terraform_deployment.py --environment prod --function exec --command "python terraform_stack/terraform_deploy/dump_rds_to_s3_as_sql.py" && \
sleep 30 && \
aws s3 sync s3://amp-app-prod-env-prod-env-files/ s3://amp-aurora-backup-prod/
env:
Expand All @@ -86,6 +86,7 @@ jobs:
aws s3 sync s3://amp-app-prod-env-prod-env-files/ s3://amp-app-staging-env-staging-env-files/ && \
python terraform_stack/terraform_deploy/terraform_deployment.py --environment staging --function exec --command 'python terraform_stack/terraform_deploy/prod_deploy_tools.py' && \
python terraform_stack/terraform_deploy/terraform_deployment.py --environment staging --function up && \
sleep 300 && \
docker compose --file stack_tests/smoke_tests/staging-platform.docker-compose.yml up --abort-on-container-exit && \
docker compose --file stack_tests/smoke_tests_viewer/staging-viewer.docker-compose.yml up --abort-on-container-exit
env:
Expand Down
24 changes: 2 additions & 22 deletions accessibility_monitoring_platform/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,34 +171,14 @@
"CONN_MAX_AGE": 0,
"ENGINE": "django.db.backends.postgresql",
}
bucket_name: str = os.environ["BUCKET_NAME"]
DATABASES["aws-s3-bucket"] = {
"bucket_name": bucket_name,
"bucket_name": os.environ["BUCKET_NAME"],
"aws_access_key_id": None,
"aws_secret_access_key": None,
"aws_region": "eu-west-2",
}
elif os.getenv("DB_SECRET") and os.getenv("DB_NAME"):
db_secrets: str = os.environ["DB_SECRET"]
json_acceptable_string: str = db_secrets.replace("'", '"')
db_secrets_dict = json.loads(json_acceptable_string)
DATABASES["default"] = {
"NAME": db_secrets_dict["dbname"],
"USER": db_secrets_dict["username"],
"PASSWORD": db_secrets_dict["password"],
"HOST": db_secrets_dict["host"],
"PORT": db_secrets_dict["port"],
"CONN_MAX_AGE": 0,
"ENGINE": "django.db.backends.postgresql",
}
bucket_name: str = os.environ["DB_NAME"]
DATABASES["aws-s3-bucket"] = {
"bucket_name": bucket_name,
"aws_access_key_id": None,
"aws_secret_access_key": None,
"aws_region": "us-east-1",
}

raise Exception(">>> Database credentials incorrectly entered")

DEFAULT_AUTO_FIELD = "django.db.models.AutoField"

Expand Down
24 changes: 0 additions & 24 deletions amp_platform.DockerFile

This file was deleted.

17 changes: 0 additions & 17 deletions amp_viewer.DockerFile

This file was deleted.

Empty file removed aws_prototype/__init__.py
Empty file.
31 changes: 0 additions & 31 deletions aws_prototype/aws_secrets.py

This file was deleted.

20 changes: 0 additions & 20 deletions aws_prototype/create_dummy_account.py

This file was deleted.

107 changes: 0 additions & 107 deletions aws_prototype/ecs_prepare_db.py

This file was deleted.

Loading
Loading