Projet GMAO
Find a file
2026-08-14 17:22:02 +00:00
.forgejo/workflows Initial import GMAO 2026-08-14 16:02:25 +00:00
app_new Track lot presence and missing equipment 2026-08-14 17:21:03 +00:00
docker Expose Docker application on the network 2026-08-14 17:21:09 +00:00
docs Initial import GMAO 2026-08-14 16:02:25 +00:00
migrations Track lot presence and missing equipment 2026-08-14 17:21:03 +00:00
scripts Expose Docker application on the network 2026-08-14 17:21:09 +00:00
tests Track lot presence and missing equipment 2026-08-14 17:21:03 +00:00
.dockerignore Initial import GMAO 2026-08-14 16:02:25 +00:00
.env.docker.example Remove hardcoded Yeastar credentials 2026-08-14 17:20:50 +00:00
.env.example Remove hardcoded Yeastar credentials 2026-08-14 17:20:50 +00:00
.gitattributes Initial import GMAO 2026-08-14 16:02:25 +00:00
.gitignore Initial import GMAO 2026-08-14 16:02:25 +00:00
AGENTS.md Initial import GMAO 2026-08-14 16:02:25 +00:00
CHANGELOG.md Initial import GMAO 2026-08-14 16:02:25 +00:00
docker-compose.override.yml Initial import GMAO 2026-08-14 16:02:25 +00:00
docker-compose.yml Expose Docker application on the network 2026-08-14 17:21:09 +00:00
Dockerfile Initial import GMAO 2026-08-14 16:02:25 +00:00
ent_watchdog.py Initial import GMAO 2026-08-14 16:02:25 +00:00
gmao_watchdog.py Initial import GMAO 2026-08-14 16:02:25 +00:00
Makefile Initial import GMAO 2026-08-14 16:02:25 +00:00
PROJECT_DOCS.md Initial import GMAO 2026-08-14 16:02:25 +00:00
pronote_watchdog.py Prevent Pronote watchdog startup crashes 2026-08-14 17:22:02 +00:00
pytest.ini Initial import GMAO 2026-08-14 16:02:25 +00:00
README.md Initial import GMAO 2026-08-14 16:02:25 +00:00
requirements.txt Initial import GMAO 2026-08-14 16:02:25 +00:00
run_app_new.py Initial import GMAO 2026-08-14 16:02:25 +00:00
VERSION Initial import GMAO 2026-08-14 16:02:25 +00:00
watchdog_dnd.py Remove hardcoded Yeastar credentials 2026-08-14 17:20:50 +00:00
wsgi.py Initial import GMAO 2026-08-14 16:02:25 +00:00

GMAO Collège - Application modulaire

Application de Gestion de Maintenance Assistée par Ordinateur pour collège.

Stack

  • Python 3.13 + Flask
  • SQLAlchemy + Flask-Migrate
  • MariaDB (obligatoire, SQLite supprimé)
  • WTForms + Flask-Login
  • Bootstrap 5 + Select2

Demarrage recommande sous Debian

Docker gere l'application et MariaDB. La procedure complete se trouve dans docs/DEBIAN.md.

chmod +x scripts/init-debian.sh docker/build-release.sh
make init
make dev

Variables d'environnement

Copier .env.example vers .env et ajuster :

DATABASE_URL=mysql+pymysql://gmao:<mdp>@/gmao_db?unix_socket=/var/run/mysqld/mysqld.sock&charset=utf8mb4
SECRET_KEY=change-me-in-production
SETUP_TOKEN=<jeton-aléatoire-d'au-moins-32-caractères>
OUTLOOK_ENCRYPTION_KEY=<base64-256-bits>
UPLOAD_FOLDER=/chemin/vers/app_new/uploads

Lors de la toute première configuration, ouvrir le wizard avec le jeton local :

http://localhost:5080/setup-wizard/?token=<SETUP_TOKEN>

Le jeton est ensuite conservé dans la session du navigateur. Ne pas le partager ni le placer dans une URL accessible depuis un réseau non fiable.

Adminer reste disponible pour le diagnostic sur http://127.0.0.1:8080 et n'est pas exposé aux autres machines du réseau.

Lancement

python3 run_app_new.py

Docker en developpement

Les sources locales sont montees dans le conteneur et Gunicorn les recharge automatiquement :

docker compose up -d --build

Docker en production

Le code est integre a une image immuable et seuls les volumes de donnees sont conserves :

./docker/build-release.sh
GMAO_VERSION="$(tr -d '\r\n' < VERSION)" \
docker compose -f docker-compose.yml up -d

La procedure complete de versionnement et de deploiement est documentee dans docs/DEPLOYMENT.md. La version courante est stockee dans VERSION.

Le port par défaut est 5080. Surcharge possible :

FLASK_PORT=8090 python3 run_app_new.py

Tests

python3 -m venv venv-tests
source venv-tests/bin/activate
pip install pytest pytest-flask factory-boy
pip install -r requirements.txt
python3 -m pytest

Structure

app_new/
├── core/          # modèles, routes auth/dashboard/admin, formulaires
├── equipments/    # gestion des équipements, bâtiments, zones, salles
├── interventions/ # interventions et maintenance
├── maintenance/   # lots, tâches, planification préventive
├── planning/      # planification et contraintes
├── yeastar/      # intégration téléphonie Yeastar
├── ent/          # intégration ENT
├── outlook/      # intégration Outlook
└── templates/    # templates Jinja2

Notes importantes

  • MariaDB obligatoire : SQLite a été retiré de toutes les configurations.
  • Tests : utilisent la base gmao_test_db, créée et détruite à chaque session.
  • CSRF : activé par défaut, désactivé en développement via DevelopmentConfig.