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

SSL config for production #59

Closed bazylhorsey closed 1 year ago

bazylhorsey commented 1 year ago

I see the comment in nginx for turning on SSL connections. However, there could be code written for integrating OpenSSL.

jonra1993 commented 1 year ago

Hi @bazylhorsey I am going to add this to todo list

jonra1993 commented 1 year ago

Hello, @bazylhorsey I have changed traefik by caddy as a reverse proxy server. It automatically generates SSL certificates and route to 443 port on the caddy file the above lines should be uncommented to enable SSL. I chose caddy instead of treafik or nginx because it make things easier and less verbose the docker-compose configuration. It also is able to serve static content

image