Application and Infra Architecture
Services:
Frontend
Backend
Migration
Postgres
Redis (dragonfly db)
Postgres
Should be persistent (and always running no matter what, single source of truth, CANNOT lose data)
Independent of any application state
Should only be provisioned once
Schemas, tables, etc get added/changed/dropped from Prisma migrate command on Backend application start
Redis
Ok if data lost (no ideal)
Independent of any application state
Backend/Frontend/Migration
Should have access to Redis + Postgres (secret credentials)
DATABASE_URL
REDIS_HOST, REDIS_PASSWORD, REDIS_USER
Auth credentials
Environments
Prod
Whenever a commit is made into main Github branch, should trigger redeployments for:
Backend, Migration and Frontend
Staging
Whenever a commit is made into develop Github branch, should trigger redeployments for:
Backend, Migration and Frontend