updated docs

This commit is contained in:
2025-11-14 17:32:11 +01:00
parent 0a96c32c93
commit 0beb889f5e
3 changed files with 41 additions and 19 deletions

View File

@@ -79,6 +79,14 @@ The workflow works in the following way:
etc.). etc.).
- Deployment Chart (charts/myapp-chart/): Helm chart to deploy the application to Kubernetes. - Deployment Chart (charts/myapp-chart/): Helm chart to deploy the application to Kubernetes.
### Other services deployed in the cluster
- Longhorn: distributed storage system providing persistent volumes for the database and other services
- Prometheus + Grafana: monitoring stack collecting metrics from the app and cluster, visualized in Grafana dashboards
- MariaDB operator: manages the MariaDB cluster based on Custom resources, creates Databases, users, handles backups
- RabbitMQ operator: manages RabbitMQ cluster based on Custom resources
- Cloudflare Tunnel: allows public access to backend API running in the private cluster, providing HTTPS
### Technologies Used ### Technologies Used
- Backend: Python, FastAPI, FastAPI Users, SQLAlchemy, Pydantic, Alembic, Celery - Backend: Python, FastAPI, FastAPI Users, SQLAlchemy, Pydantic, Alembic, Celery
@@ -202,10 +210,10 @@ bash upgrade_database.sh
### 5) Run backend ### 5) Run backend
Before running the backend, make sure to set the necessary environment variables. Either by setting them in your shell
or by setting them in run configuration in your IDE.
```bash ```bash
cd backend cd backend
#TODO: set env variables
uvicorn app.app:fastApi --reload --host 0.0.0.0 --port 8000 uvicorn app.app:fastApi --reload --host 0.0.0.0 --port 8000
``` ```
@@ -258,7 +266,7 @@ via GitHub actions and Helm chart. Frontend files are deployed to Cloudflare pag
### Setup Cluster ### Setup Cluster
Deployment should work on any Kubernetes cluster. However, we are using 4 TalosOS virtual machines (1 control plane, 3 Deployment should work on any Kubernetes cluster. However, we are using 5 TalosOS virtual machines (1 control plane, 4
workers) workers)
running on top of Proxmox VE. running on top of Proxmox VE.

View File

@@ -1,23 +1,14 @@
## Folder structure ## Folder structure
- `src/` - `src/`
- `backend/` - `backend/` - Python FastAPI backend application. Described in separate [README](./backend/README.md).
- `alembic/` - database migrations
- `app/` - main application code
- `tests/` - tests
- `docker-compose.test.yml` - docker compose for testing database
- `Dockerfile` - production Dockerfile
- `main.py` - App entrypoint
- `requirements.txt` - Python dependencies
- `test_locally.sh` - script to run tests with temporary database
- `charts/` - `charts/`
- `myapp-chart/` - Helm chart for deploying the application, supports prod and dev environments - `myapp-chart/` - Helm chart for deploying the application, supports prod and dev environments. Described in
- `frontend/` - React frontend application separate [README](./charts/README.md).
- `tofu/` - Terraform/OpenTofu services deployment configurations - `frontend/` - React frontend application. Described in separate
- `modules/` - separated modules for different services [README](./frontend/README.md).
- `main.tf` - main deployment configuration - `tofu/` - Terraform/OpenTofu services deployment configurations. Described in separate
- `variables.tf` - deployment variables [README](./tofu/README.md).
- `terraform.tfvars.example` - example variables file
- `compose.yaml` - Docker Compose file for local development - `compose.yaml` - Docker Compose file for local development
- `create_migration.sh` - script to create new Alembic database migration - `create_migration.sh` - script to create new Alembic database migration
- `upgrade_database.sh` - script to upgrade database to latest Alembic revision - `upgrade_database.sh` - script to upgrade database to latest Alembic revision

View File

@@ -0,0 +1,23 @@
# Backend
This directory contains the backend code for the project. It is built using Python and FastAPI framework and with
database migrations support using Alembic.
## Directory structure
- `alembic/` - database migrations
- `app/` - main application code
- `api/` - API endpoints - routers/controllers with request handling logic
- `core/` - core application logic - database session management, security
- `models/` - database models
- `schemas/` - Endpoint schemas
- `services/` - utilities for various tasks
- `workers/` - background tasks
- `app.py` - FastAPI startup script
- `celery_app.py` - Celery startup script
- `tests/` - tests
- `docker-compose.test.yml` - docker compose for testing database
- `Dockerfile` - production Dockerfile
- `main.py` - App entrypoint
- `requirements.txt` - Python dependencies
- `test_locally.sh` - script to run tests with temporary database