Skip to content

Add Docker containerization and web interface with automatic folder monitoring#3

Draft
Copilot wants to merge 11 commits into
mainfrom
copilot/dockerise-app-add-web-interface
Draft

Add Docker containerization and web interface with automatic folder monitoring#3
Copilot wants to merge 11 commits into
mainfrom
copilot/dockerise-app-add-web-interface

Conversation

Copy link
Copy Markdown

Copilot AI commented Dec 30, 2025

Containerizes BDneX and adds a Flask-based web UI for processing comics, tracking jobs, and viewing logs in real-time. Includes automatic folder monitoring and uncertain match management for continuous server operation.

Docker Setup

  • Dockerfile: Python 3.9-slim with system dependencies (unrar-free, libgl1, libglib2.0-0)
  • docker-compose.yml: Single-command deployment with persistent volumes for cache/config/watch folder
  • .dockerignore: Optimized build context excluding tests and build artifacts

Web Interface (bdnex/web/)

  • Backend: Flask REST API with 15+ endpoints for job submission, status tracking, log retrieval, folder watching, and uncertain match management
  • Frontend: Responsive single-page app with real-time job monitoring, filterable log viewer, watcher controls, and uncertain matches tab
  • Concurrency: Thread-safe job processing with dedicated locks, max 5 concurrent jobs, daemon threads
  • API highlights:
    • POST /api/process/file - Process single comic file
    • POST /api/process/directory - Batch process directory
    • GET /api/logs?level=INFO&limit=100 - Retrieve logs with filtering
    • GET /api/jobs - List all jobs with status
    • POST /api/watcher/enable - Enable automatic folder monitoring
    • GET /api/uncertain-matches - List comics with low confidence matches

Automatic Processing (NEW)

  • Folder Watcher: Background thread monitors /data/watch for new comics
  • Configurable Intervals: Scan every 60-N seconds (default: 300s)
  • Auto-enable: Set BDNEX_AUTO_WATCH=true to start monitoring on launch
  • Smart Processing: Tracks processed files to avoid reprocessing
  • Dynamic Control: Enable/disable and adjust interval via web interface

Uncertain Matches Management (NEW)

  • Detection: Automatically identifies comics with low confidence matches
  • Review Interface: Dedicated tab in web UI for manual review
  • Actions: Retry processing or dismiss uncertain matches
  • Quality Control: Prevents incorrect metadata application

Documentation

  • Updated README.md/README_FR.md with Docker installation, web UI usage, and new features
  • Added DOCKER_QUICKSTART.md for step-by-step deployment
  • Created bdnex/web/README.md documenting all API endpoints including new watcher and uncertain matches APIs
  • Security considerations documented

Configuration

  • Flask dependencies added to setup.py install_requires
  • Environment variables for custom paths (BDNEX_UPLOAD_FOLDER, BDNEX_OUTPUT_FOLDER, BDNEX_WATCH_FOLDER)
  • Environment variables for automatic processing (BDNEX_AUTO_WATCH, BDNEX_WATCH_INTERVAL)
  • .env.example provided with all configuration options

Usage

docker-compose up -d
# Access http://localhost:5000

Place comics in ./data/comics for manual processing, or ./data/watch for automatic processing. Processed files appear in ./data/output.

The application now operates as a continuous server with automatic folder monitoring, making it suitable for NAS setups and automated library management.

Original prompt

Dockerise cette app et crée une interface web pour la gérer et suivre les logs. N'oublie pas de mettre à jour la doc


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 7 commits December 30, 2025 12:47
Co-authored-by: guiltekmdion <114142370+guiltekmdion@users.noreply.github.com>
Co-authored-by: guiltekmdion <114142370+guiltekmdion@users.noreply.github.com>
Co-authored-by: guiltekmdion <114142370+guiltekmdion@users.noreply.github.com>
Co-authored-by: guiltekmdion <114142370+guiltekmdion@users.noreply.github.com>
Co-authored-by: guiltekmdion <114142370+guiltekmdion@users.noreply.github.com>
Co-authored-by: guiltekmdion <114142370+guiltekmdion@users.noreply.github.com>
Co-authored-by: guiltekmdion <114142370+guiltekmdion@users.noreply.github.com>
@guiltekmdion
Copy link
Copy Markdown
Owner

Oublie pas de gérer que le docker doit surveiller un dossier pour mettre à jour ceux qu'il n'a pas fait et avoir une cron qui tourne optionnelement toutes les x temps

Copilot AI changed the title [WIP] Dockerize app and add web interface for managing logs Add Docker containerization and web interface for job management and log monitoring Dec 30, 2025
Copilot AI requested a review from guiltekmdion December 30, 2025 13:01
Copy link
Copy Markdown
Owner

@guiltekmdion guiltekmdion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oublie pas de gérer que le docker doit surveiller un dossier pour mettre à jour ceux qu'il n'a pas fait et avoir une cron qui tourne optionnelement toutes les x temps.
Intègre les correspondances non sûres dans ce panel dans une tab quelque part car ça devient une app continue façon serveur, et plus seulement un outil à la demande

Copilot AI and others added 2 commits December 30, 2025 13:13
Co-authored-by: guiltekmdion <114142370+guiltekmdion@users.noreply.github.com>
Co-authored-by: guiltekmdion <114142370+guiltekmdion@users.noreply.github.com>
Copy link
Copy Markdown
Author

Copilot AI commented Dec 30, 2025

Oublie pas de gérer que le docker doit surveiller un dossier pour mettre à jour ceux qu'il n'a pas fait et avoir une cron qui tourne optionnelement toutes les x temps

J'ai ajouté ces fonctionnalités dans le commit 084fb4a :

Surveillance de dossier - Le Docker surveille maintenant automatiquement le dossier /data/watch pour traiter les nouvelles BD
Cron/Planification - Intervalle configurable (par défaut 5 minutes) via BDNEX_WATCH_INTERVAL

Fonctionnalités ajoutées:

  • Surveillance automatique activable via BDNEX_AUTO_WATCH=true
  • Interface web pour activer/désactiver et configurer l'intervalle
  • Suivi des fichiers traités pour éviter le retraitement
  • Section "Uncertain Matches" pour gérer les correspondances incertaines
  • Thread en arrière-plan qui respecte les limites de tâches simultanées

Utilisation:

  1. Placer les BD dans ./data/watch
  2. Activer la surveillance dans l'interface web ou définir BDNEX_AUTO_WATCH=true
  3. L'application traite automatiquement les nouveaux fichiers

L'application fonctionne maintenant en mode serveur continu !

Oublie pas de gérer que le docker doit surveiller un dossier pour mettre à jour ceux qu'il n'a pas fait et avoir une cron qui tourne optionnelement toutes les x temps.
Intègre les correspondances n...

Toutes les fonctionnalités demandées ont été implémentées dans les commits 084fb4a et 7838ec8 :

Surveillance de dossier avec cron - Monitoring automatique du dossier /data/watch avec intervalle configurable
Tab des correspondances incertaines - Nouvelle section dédiée dans l'interface pour gérer les correspondances non sûres

Interface Web mise à jour:

  • Section "Folder Watcher" avec contrôles enable/disable et configuration d'intervalle
  • Nouvelle carte "⚠️ Uncertain Matches" avec actions Retry/Dismiss
  • Affichage du statut en temps réel (fichiers non traités, correspondances incertaines)
  • Auto-refresh toutes les 10 secondes

API REST complète:

  • /api/watcher/enable et /api/watcher/disable pour contrôler la surveillance
  • /api/uncertain-matches pour lister les correspondances incertaines
  • /api/uncertain-matches/<index>/resolve pour gérer chaque cas

L'application est maintenant une app continue façon serveur avec gestion automatique et interface complète pour les cas difficiles !

Co-authored-by: guiltekmdion <114142370+guiltekmdion@users.noreply.github.com>
Copilot AI changed the title Add Docker containerization and web interface for job management and log monitoring Add Docker containerization and web interface with automatic folder monitoring Dec 30, 2025
Copilot AI requested a review from guiltekmdion December 30, 2025 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants