CTAO DPPS QualPipe Web Application
Project description
QualPipe-Webapp
The QualPipe-webapp project uses FastAPI as backend and frontend, plus D3.js for dynamic frontend visualizations, separated into clean services using Docker Compose.
๐ Project Structure
/qualpipe-webapp
โ
โโโ docker-compose.dev.yml # Docker compose for developer
โโโ docker-compose.yml # Docker compose for user
โโโ Makefile # Makefile to build Backend and Frontend
โ
โโโ docs/ # Document folder
โ
โโโ src/
โ โโโ qualpipe_webapp/ # FastAPI backend
โ โโโ backend/ # FastAPI backend
โ โ โโโ main.py # Main FastAPI app
โ โ โโโ data/ # JSON data sources
โ โ โโโ requirements.txt # Backend dependencies
โ โ โโโ requirements-dev.txt # Backend dependencies for developer
โ โ โโโ Dockerfile # Backend container
โ โ
โ โโโ frontend/ # FastAPI frontend
โ โ โโโ /templates/ # Template pages
โ โ โโโ /static/ # Static files (css, js, lib)
โ โ โโโ main.py # Main FastAPI app
โ โ โโโ requirements.txt # Frontend dependencies
โ โ โโโ requirements-dev.txt # Frontend dependencies for developer
โ โ โโโ Dockerfile # Frontend container
โ โ
โ โโโ nginx/
โ โ โโโ nginx.conf
โ โ โโโ ssl/ # (optional later)
โ
โโโ .gitignore
Instructions
To run it in the background, from the project folder qualpipe-webapp simply execute:
make up
Then open your browser:
-
Frontend: http://localhost/
To stop everything, execute:
make down
If you also want to automatically see the logs you can then run it via docker compose
To run it the first time execute: (later on you can remove the --build)
docker-compose up --build
To stop it you can soft-kill with CTRL-C and shut down all the services executing make down.
If instead you do any modification to the config while the containers are running or in case Docker caches wrong stuff, you can restart it running:
make restart
or
docker-compose down -v --remove-orphans
docker-compose up --build
Makefile
Description of all the Makefile functionalities:
| Command | What it does |
|---|---|
| make build | Build the Docker images |
| make up | Build and start services (backend + frontend) in background |
| make down | Stop all services |
| make logs | View combined logs (both frontend and backend) |
| make logs-backend | View only backend logs |
| make logs-frontend | View only frontend logs |
| make restart | Restart the containers |
| make prune | Clean up unused Docker containers/images |
| ------------------ | ----------------------------------------------------------- |
| make build-dev | Build the Docker images |
| make up-dev | Build and start services (backend + frontend) in background |
Developers
For developers, you can build containers that automatically file changes, avoiding the need to restart the containers every time. To do so, simply execute:
make build-dev
make up-dev
This will automatically output also every log produced.
Contributing
If you want to contribute in developing the code, be aware that we are using pre-commit, code-spell and ruff tools for automatic adherence to the code style. To enforce running these tools whenever you make a commit, setup the pre-commit hook executing:
pre-commit install
The pre-commit hook will then execute the tools with the same settings as when a merge request is checked on GitLab, and if any problems are reported the commit will be rejected. You then have to fix the reported issues before tying to commit again.
License
This project is licensed under the BSD 3-Clause License. See the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ctao_qualpipe_webapp-0.1.0.tar.gz.
File metadata
- Download URL: ctao_qualpipe_webapp-0.1.0.tar.gz
- Upload date:
- Size: 302.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6fb9f621dc1b9dc8401673bc78d841a7da2786e561798c748bcc4fe9f04765f
|
|
| MD5 |
fbdd5ca228c8a1b687623a3492cbdd81
|
|
| BLAKE2b-256 |
852b2ae0dc812fbc9b314d03f6a1e9e28455d5c538507901bdc1870341e5e268
|
File details
Details for the file ctao_qualpipe_webapp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ctao_qualpipe_webapp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 305.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
184c59fc3746409e613dc8982e49073d4d48f0dee050df47baf244cc1b3c3944
|
|
| MD5 |
26a16592e8b32cd0e4ec01e2bc5e0991
|
|
| BLAKE2b-256 |
eb8f8cd691ac5cc12a2bcfdeccb9243c460c7276d5dcf9b386ae26479c43ecf8
|