- Application: Cruddur
- Cohort: 2023-A1
The /journal
directory contains
The local environment uses a local Postgres container for users and their activities.
- Set env variables in
backend-flask[.erb,.env] and frontend-react-js[.erb,.env]
:- update
CONNECTION_URL
in the backend-flask scope to use your local postgres container url - update
AWS_ENDPOINT_URL
in the backend-flask scope to usehttp://host.docker.internal:8000/
if you are running on a local machine outside of gitpod
- update
- Run
docker-compose.yaml
from the project root - Run the Postgres database
setup
script to create the database, tables, seed users and activities, and update seeded users' UUIDs from Cognito - Run the DynamoDB schema-load and seed scripts to created seed conversations between the seeded users
The production environment uses RDS (Postgres) for users and their activities.
- If
user
andactivities
tables DO NOT EXIST in the RDS, run the Postgres databaseschema-load
script withprod
as the first argument to initialize the tables in the RDS - If the backend-flask and frontend-react-js services are NOT deployed to ECS, create the services from the json files.
aws ecs create-service --cli-input-json file://aws/json/service-backend-flask.json
aws ecs create-service --cli-input-json file://aws/json/service-frontend-react-js.json
If the service's task definitions DO NOT EXIST, you must create them
aws ecs register-task-definition --cli-input-json file://aws/task-definitions/backend-flask.json
aws ecs register-task-definition --cli-input-json file://aws/task-definitions/frontend-react-js.json
Local:
- Check container logs
- Inspect on browser using Developer Tools
AWS Production:
- Check logs from the deployed services on CloudWatch
- Connect to the ECS task and check whether functions can run and if any errors are displayed
- Check security groups and inbound rules on each of the services used (eg. ALB, EC2, RDS) for connectivity issues between them
- Inspect on browser using Developer Tools