2db0033bc05195f1489091a326e3fc1b578dfb6f
Features: - Dockerfile for containerized deployment - Docker Compose configuration with health checks - Automated database initialization via entrypoint script - Quick start script for easy Docker deployment - Comprehensive Docker deployment documentation (DOCKER.md) - Complete README with installation and usage instructions - .dockerignore for optimized image builds Improvements: - PDF conversion now preserves orientation (portrait/landscape) - PDF rendering at 300 DPI for sharp quality - Maintains aspect ratio during conversion - Compact media library view with image thumbnails - Better media preview with scrollable gallery Docker Features: - Multi-stage build for smaller images - Non-root user for security - Health checks for container monitoring - Volume mounts for persistent data - Production-ready Gunicorn configuration - Support for Redis caching (optional)
DigiServer v2
Digital Signage Management System - A modern Flask-based application for managing content playlists across multiple display screens.
Features
- 📺 Multi-Player Management - Control multiple display screens from one interface
- 🎬 Playlist System - Create and manage content playlists with drag-and-drop reordering
- 📁 Media Library - Upload and organize images, videos, PDFs, and presentations
- 📄 PDF to Image Conversion - Automatic conversion of PDF pages to Full HD images (300 DPI)
- 📊 PowerPoint Support - Convert PPTX slides to images automatically
- 🖼️ Live Preview - Real-time content preview for each player
- ⚡ Real-time Updates - Players automatically sync with playlist changes
- 🌓 Dark Mode - Full dark mode support across all interfaces
- 🗑️ Media Management - Clean up unused media files with leftover media manager
- 🔒 User Authentication - Secure admin access with role-based permissions
Quick Start
Option 1: Docker (Recommended)
# Quick start with Docker
./docker-start.sh
Access at: http://localhost:5000
Default credentials: admin / admin123
See DOCKER.md for detailed Docker documentation.
Option 2: Manual Installation
Prerequisites
- Python 3.13+
- LibreOffice (for PPTX conversion)
- Poppler Utils (for PDF conversion)
- FFmpeg (for video processing)
Installation
# Install system dependencies (Debian/Ubuntu)
sudo apt-get update
sudo apt-get install -y poppler-utils libreoffice ffmpeg libmagic1
# Create virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install Python dependencies
pip install -r requirements.txt
# Initialize database
python -c "
from app.app import create_app
from app.extensions import db, bcrypt
from app.models import User
app = create_app()
with app.app_context():
db.create_all()
hashed = bcrypt.generate_password_hash('admin123').decode('utf-8')
admin = User(username='admin', password=hashed, role='admin')
db.session.add(admin)
db.session.commit()
print('Admin user created')
"
# Run development server
./run_dev.sh
Access at: http://localhost:5000
Deployment
Docker Deployment
# Build and run with Docker Compose
docker-compose up -d
# View logs
docker-compose logs -f
# Stop
docker-compose down
Production Deployment
For production, use:
- Gunicorn or uWSGI as WSGI server
- Nginx as reverse proxy
- Redis for caching (optional)
- PostgreSQL for larger deployments (optional)
See DOCKER.md for detailed deployment instructions.
Usage
1. Create a Playlist
- Navigate to Playlist Management
- Fill in playlist details (name, orientation, description)
- Click Create Playlist
2. Upload Media
- Go to Upload Media page
- Select files (images, videos, PDFs, PPTX)
- Choose media type and duration
- Select target playlist (optional)
- Click Upload
Supported Formats:
- Images: JPG, PNG, GIF, BMP, WEBP
- Videos: MP4, AVI, MOV, MKV, WEBM
- Documents: PDF, PPT, PPTX
3. Manage Playlists
- Open playlist management
- Drag and drop to reorder content
- Edit duration for each item
- Remove unwanted items
- Changes sync automatically to players
4. Assign to Players
- Go to Player Assignments
- Select playlist from dropdown for each player
- View live preview to verify content
5. Clean Up Media
- Navigate to Admin → Manage Leftover Media
- Review unused files
- Delete individual files or bulk delete by type
Configuration
Environment Variables
Create a .env file:
FLASK_ENV=production
SECRET_KEY=your-random-secret-key
DATABASE_URL=sqlite:///instance/digiserver.db
Upload Settings
Edit app/config.py to adjust:
- Upload folder location
- Maximum file size
- Allowed file extensions
Project Structure
digiserver-v2/
├── app/
│ ├── blueprints/ # Route handlers
│ │ ├── admin.py # Admin panel routes
│ │ ├── content.py # Content management
│ │ ├── playlist.py # Playlist operations
│ │ └── players.py # Player management
│ ├── models/ # Database models
│ ├── templates/ # HTML templates
│ ├── static/ # CSS, JS, uploads
│ └── utils/ # Helper functions
├── instance/ # Database storage
├── Dockerfile # Docker configuration
├── docker-compose.yml # Docker Compose config
└── requirements.txt # Python dependencies
API Endpoints
Player API
GET /api/playlist/<player_id>- Get player playlistPOST /api/players/<player_id>/heartbeat- Send heartbeat
Admin API
POST /playlist/<player_id>/update-duration/<content_id>- Update content durationPOST /playlist/<player_id>/reorder- Reorder playlist items
Troubleshooting
PDF Conversion Fails
Ensure poppler-utils is installed:
sudo apt-get install poppler-utils
PPTX Conversion Fails
Install LibreOffice:
sudo apt-get install libreoffice
Upload Fails
Check folder permissions:
chmod -R 755 app/static/uploads
Database Issues
Reset database:
rm instance/*.db
# Then reinitialize (see Installation)
Development
Running Tests
pytest
Code Formatting
black app/
flake8 app/
Database Migrations
flask db migrate -m "Description"
flask db upgrade
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
License
This project is proprietary software. All rights reserved.
Support
For issues and questions:
- Check DOCKER.md for deployment help
- Review troubleshooting section
- Check application logs
Version History
- v2.0 - Complete rewrite with playlist-centric architecture
- PDF to image conversion (300 DPI)
- PPTX slide conversion
- Leftover media management
- Enhanced dark mode
- Duration editing for all content types
Built with ❤️ using Flask, SQLAlchemy, and modern web technologies
Description
Languages
HTML
48.4%
Python
45%
Shell
6.3%
Dockerfile
0.3%