- RabbitMQ
- PostgreSQL
- Seq
- Jaeger
- Set AWS Keys
set AWS_ACCESS_KEY_ID =hello
set AWS_SECRET_ACCESS_KEY =hello
set AWS_REGION=us-east-1
- Run all the docker commands in the
docker containers
file in the root directory.
docker compose -f docker-compose.dependencies.yml up
Migrations
-
In
Package manager console
change toChurchManager.Infrastructure.Persistence
project -
Add-Migration InitialDbMigration -Context ChurchManagerDbContext -o Migrations -StartupProject ChurchManager.Api
-
Update-Database -Context ChurchManagerDbContext -StartupProject ChurchManager.Api
Cannot delete because connections are not closed
- in the docker container execute: `psql -U admin`
- `SELECT * FROM pg_stat_activity WHERE pg_stat_activity.datname='churchmanager_db';` shows open connections
- `SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE datname = 'churchmanager_db';` close open connections
- `DROP DATABASE churchmanager_db;`
Most settings for production e.g. database connection will come from AWS Parameter store
.
AWS Cognito IDP
https://cognito-idp.us-east-1.amazonaws.com/us-east-1_i6pWJxu8q/.well-known/openid-configuration
set AWS_DEFAULT_PROFILE=personal
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 977844596384.dkr.ecr.us-east-1.amazonaws.com
- Create ECR Respository
aws ecr create-repository --repository-name frontend-angular --image-scanning-configuration scanOnPush=true --image-tag-mutability IMMUTABLE --region us-east-1 --profile personal
- Build the docker image
- Tag the docker image
docker tag church-manager-ui:latest 977844596384.dkr.ecr.us-east-1.amazonaws.com/frontend-angular:local
- Push the image
docker push 977844596384.dkr.ecr.us-east-1.amazonaws.com/frontend-angular:local