Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/luftdaten-at/luftdaten-api
Open source database, analytics and API for air quality data build on the FastAPI Framework.
https://github.com/luftdaten-at/luftdaten-api
database fastapi
Last synced: 16 days ago
JSON representation
Open source database, analytics and API for air quality data build on the FastAPI Framework.
- Host: GitHub
- URL: https://github.com/luftdaten-at/luftdaten-api
- Owner: luftdaten-at
- License: agpl-3.0
- Created: 2024-07-25T09:29:09.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-12-02T09:23:31.000Z (about 1 month ago)
- Last Synced: 2024-12-02T10:26:58.994Z (about 1 month ago)
- Topics: database, fastapi
- Language: Python
- Homepage: https://api.luftdaten.at
- Size: 145 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# luftdaten-api
## About luftdaten-api
luftdaten-api ist an open source database for air quality data build on the FastAPI Framework.## Documentation
### Development
Development version:docker compose up -d
#### Database migration
Setup alembic folder and config files:
docker compose exec app alembic init alembicGenerate and apply migrations:
docker compose exec app alembic revision --autogenerate -m "Initial migration"
docker compose exec app alembic upgrade headRollback migrations:
docker compose exec app alembic downgrade#### Database reset
docker compose down
docker volume ls
docker volume rm luftdaten-api_postgres_data
docker compose up -d
docker compose exec app alembic upgrade head#### Deployment
Build and push to Dockerhub.
docker build -f Dockerfile.prod -t luftdaten/api:tagname --platform linux/amd64 .
docker push luftdaten/api:tagnameCurrently automaticly done by Github Workflow.
Tags:
- **staging**: latest version for testing
- **x.x.x**: released versions for production### Production
Create docker-compose.prod.yml from example-docker-compose.prod.yml by setting the secret key. Then run:
docker compose -f docker-compose.prod.yml up -d
Create database structure:
docker compose exec app alembic upgrade head## API Documentation
Open API Standard 3.1
/docs
https://api.luftdaten.at/docs## License
This project is licensed under GNU General Public License v3.0.