.dockerignore
to exclude unnecessary files. - Use environment variables via .env
and pydantic.BaseSettings
. - Organize FastAPI routers with APIRouter
in modular route files. - Prebuild the frontend with vite build
before creating production image. - Split backend config: dev
, test
, prod
.