This is a minimal repository for a FastAPI app instance with:
- Database: postgres;
- ORM: SQLAlchemy;
- Monitoring: prometheus.
For installation of packages on file requirements.txt
, run the command on terminal according to your operational system.
- Window/Linux/MacOSs:
- Navigate to root folder;
- Install with command run
pip install -r requirements.txt
.
-
Change the environment variables on
.env
file;- Change variable ENVIRONMENT to
production
; - Change the non-test database credentials to your remote database configuration;
- Change the variable
SECRET_KEY
to some trustworthy string;
- Change variable ENVIRONMENT to
-
Run command
docker compose up
;
You have to change them with a secret key, to generate secret keys you can run the following command:
python -c "import secrets; print(secrets.token_urlsafe(32))"
Copy the content and use that as password / secret key. And run that again to generate another secure key.
-
Backend docs: backend/README.md.
-
Deployment docs: deployment.md.
-
General development docs: development.md.
This includes using Docker Compose, custom local domains, .env
configurations, etc.
- ( Normal ) Validate data insertion on database;
- ( Hard ) Create endpoint for data import;
- ( Hard ) Create routine for data processing (alternatives: Apscheduler/Celery).