jonra1993 / fastapi-alembic-sqlmodel-async

This is a project template which uses FastAPI, Pydantic 2.0, Alembic and async SQLModel as ORM. It shows a complete async CRUD using authentication and role base access control.
MIT License
964 stars 150 forks source link

RDS configuration terraform #51

Closed bazylhorsey closed 1 year ago

bazylhorsey commented 1 year ago

It is mentioned in your docs to use a persistent database. I think it would be cool to show how to use terraform to create this. The way it's currently set up, horizontal scaling will cause data to not be centralized. So if another instance boots, there is a 50/50 chance the data gets in the spot the user is connected to. Then, its also possible they could have data in both spots. Therefore postgres (and likely redis) should be taken out of docker-compose.yml and moved to terraform.

jonra1993 commented 1 year ago

Hello, @bazylhorsey I agree I am going to add it in the coming days.

bazylhorsey commented 1 year ago

can this be closed?

Btw I'm going to be sharing some ideas for more terraform in the coming weeks