feat: add videodb media index with Docker stack

- Add videodb PHP/MySQL media collection manager (Blu-ray, DVD, CD)
- Dockerfile: PHP 8.1 + Apache with GD/mysqli/exif extensions
- docker-compose.yml: app on port 6761 + MySQL 8.0 with health checks
- docker-entrypoint.sh: auto-generates config.inc.php from env vars,
  waits for MySQL, initializes DB schema idempotently
- init-db.php: CLI schema installer using app's own prefix_query() logic
- Persistent volumes for DB, cache, and cover images

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-11 09:49:52 +02:00
commit f55c91276e
1230 changed files with 252321 additions and 0 deletions

47
docker-compose.yml Normal file
View File

@@ -0,0 +1,47 @@
services:
app:
build:
context: ./videodb
container_name: videodb_app
ports:
- "6761:80"
environment:
DB_HOST: db
DB_USER: videodb
DB_PASSWORD: videodb_secret
DB_NAME: videodb
DB_PREFIX: videodb_
depends_on:
db:
condition: service_healthy
volumes:
# Persist cover images and cached thumbnails across rebuilds
- videodb_cache:/var/www/html/cache
- videodb_images:/var/www/html/images
restart: unless-stopped
db:
image: mysql:8.0
container_name: videodb_db
environment:
MYSQL_ROOT_PASSWORD: root_secret
MYSQL_DATABASE: videodb
MYSQL_USER: videodb
MYSQL_PASSWORD: videodb_secret
volumes:
- videodb_db:/var/lib/mysql
# MySQL 8 defaults to caching_sha2_password; keep native auth for broad client compat
command: --default-authentication-plugin=mysql_native_password
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "videodb", "-pvideodb_secret"]
interval: 10s
timeout: 5s
retries: 12
start_period: 30s
restart: unless-stopped
volumes:
videodb_db:
videodb_cache:
videodb_images: