Files
infoscreen/docker-compose.yml
RobbStarkAustria a7df3c2708 feat(dashboard): header user dropdown (Syncfusion) + proper logout; docs: clarify architecture; build: add splitbuttons; bump alpha.10
Dashboard

Add top-right user dropdown using Syncfusion DropDownButton: shows username + role; menu entries “Profil” and “Abmelden”.
Replace custom dropdown logic with Syncfusion component; position at header’s right edge.
Update /logout page to call backend logout and redirect to /login (reliable user switching).
Build/Config

Add @syncfusion/ej2-react-splitbuttons and @syncfusion/ej2-splitbuttons dependencies.
Update Vite optimizeDeps.include to pre-bundle splitbuttons and avoid import-analysis errors.
Docs

README: Rework Architecture Overview with clearer data flow:
Listener consumes MQTT (discovery/heartbeats) and updates API.
Scheduler reads from API and publishes events via MQTT to clients.
Clients send via MQTT and receive via MQTT.
Worker receives commands directly from API and reports results back (no MQTT).
Explicit note: MariaDB is accessed exclusively by the API Server; Dashboard never talks to DB directly.
README: Add SplitButtons to “Syncfusion Components Used”; add troubleshooting steps for @syncfusion/ej2-react-splitbuttons import issues (optimizeDeps + volume reset).
Copilot instructions: Document header user menu and splitbuttons technical notes (deps, optimizeDeps, dev-container node_modules volume).
Program info

Bump to 2025.1.0-alpha.10 with changelog:
UI: Header user menu (DropDownButton with username/role; Profil/Abmelden).
Frontend: Syncfusion SplitButtons integration + Vite pre-bundling config.
Fix: Added README guidance for splitbuttons import errors.
No breaking changes.
2025-10-15 16:33:35 +00:00

214 lines
5.7 KiB
YAML

networks:
infoscreen-net:
driver: bridge
services:
listener:
build:
context: .
dockerfile: listener/Dockerfile
image: infoscreen-listener:latest
container_name: infoscreen-listener
restart: unless-stopped
depends_on:
db:
condition: service_healthy
mqtt:
condition: service_healthy
environment:
- DB_CONN=mysql+pymysql://${DB_USER}:${DB_PASSWORD}@db/${DB_NAME}
- DB_URL=mysql+pymysql://${DB_USER}:${DB_PASSWORD}@db/${DB_NAME}
- ENV=${ENV:-development}
- FLASK_SECRET_KEY=${FLASK_SECRET_KEY:-dev-secret-key-change-in-production}
- DEFAULT_SUPERADMIN_USERNAME=${DEFAULT_SUPERADMIN_USERNAME:-superadmin}
- DEFAULT_SUPERADMIN_PASSWORD=${DEFAULT_SUPERADMIN_PASSWORD}
# 🔧 ENTFERNT: Volume-Mount ist nur für die Entwicklung
networks:
- infoscreen-net
proxy:
image: nginx:1.25 # 🔧 GEÄNDERT: Spezifische Version
container_name: infoscreen-proxy
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro # 🔧 GEÄNDERT: Relativer Pfad
- ./certs:/etc/nginx/certs:ro # 🔧 GEÄNDERT: Relativer Pfad
depends_on:
- server
- dashboard
networks:
- infoscreen-net
db:
image: mariadb:11.2 # 🔧 GEÄNDERT: Spezifische Version
container_name: infoscreen-db
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
MYSQL_DATABASE: ${DB_NAME}
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_PASSWORD}
volumes:
- db-data:/var/lib/mysql
ports:
- "3306:3306"
networks:
- infoscreen-net
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 30s
timeout: 5s
retries: 3
start_period: 30s
mqtt:
image: eclipse-mosquitto:2.0.21 # ✅ GUT: Version ist bereits spezifisch
container_name: infoscreen-mqtt
restart: unless-stopped
volumes:
- ./mosquitto/config:/mosquitto/config
- ./mosquitto/data:/mosquitto/data
- ./mosquitto/log:/mosquitto/log
ports:
- "1883:1883" # Standard MQTT
- "9001:9001" # WebSocket (falls benötigt)
networks:
- infoscreen-net
healthcheck:
test:
[
"CMD-SHELL",
"mosquitto_pub -h localhost -t test -m 'health' || exit 1",
]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
server:
build:
context: .
dockerfile: server/Dockerfile
image: infoscreen-api:latest
container_name: infoscreen-api
restart: unless-stopped
depends_on:
db:
condition: service_healthy
mqtt:
condition: service_healthy
environment:
DB_CONN: "mysql+pymysql://${DB_USER}:${DB_PASSWORD}@db/${DB_NAME}"
FLASK_ENV: ${FLASK_ENV}
ENV_FILE: ${ENV_FILE}
MQTT_BROKER_URL: ${MQTT_BROKER_URL}
MQTT_USER: ${MQTT_USER}
MQTT_PASSWORD: ${MQTT_PASSWORD}
REDIS_URL: "${REDIS_URL:-redis://redis:6379/0}"
GOTENBERG_URL: "${GOTENBERG_URL:-http://gotenberg:3000}"
ports:
- "8000:8000"
networks:
- infoscreen-net
volumes:
- media-data:/app/server/media
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 5s
retries: 3
start_period: 40s
# ✅ GEÄNDERT: Dashboard jetzt mit Node.js/React statt Python/Dash
dashboard:
build:
context: ./dashboard
dockerfile: Dockerfile
args:
- VITE_API_URL=${API_URL}
image: infoscreen-dashboard:latest
container_name: infoscreen-dashboard
restart: unless-stopped
depends_on:
server:
condition: service_healthy
environment:
- NODE_ENV=production
- VITE_API_URL=${API_URL}
# 🔧 ENTFERNT: Port wird in Produktion nicht direkt freigegeben, Zugriff via Proxy
networks:
- infoscreen-net
healthcheck:
# 🔧 GEÄNDERT: Healthcheck prüft den Nginx-Server im Container
test: ["CMD", "curl", "-f", "http://localhost/"]
interval: 30s
timeout: 5s
retries: 3
# 🔧 ERHÖHT: Gibt dem Backend mehr Zeit zum Starten, bevor dieser
# Container als "gesund" markiert wird.
start_period: 60s
scheduler:
build:
context: .
dockerfile: scheduler/Dockerfile
image: infoscreen-scheduler:latest
container_name: infoscreen-scheduler
restart: unless-stopped
depends_on:
# HINZUGEFÜGT: Stellt sicher, dass die DB vor dem Scheduler startet
db:
condition: service_healthy
mqtt:
condition: service_healthy
environment:
# HINZUGEFÜGT: Datenbank-Verbindungsstring
- DB_CONN=mysql+pymysql://${DB_USER}:${DB_PASSWORD}@db/${DB_NAME}
- MQTT_PORT=1883
networks:
- infoscreen-net
volumes:
- ./scheduler:/app/scheduler
redis:
image: redis:7-alpine
container_name: infoscreen-redis
restart: unless-stopped
networks:
- infoscreen-net
gotenberg:
image: gotenberg/gotenberg:8
container_name: infoscreen-gotenberg
restart: unless-stopped
networks:
- infoscreen-net
worker:
build:
context: .
dockerfile: server/Dockerfile
image: infoscreen-worker:latest
container_name: infoscreen-worker
restart: unless-stopped
depends_on:
- redis
- gotenberg
- db
environment:
DB_CONN: "mysql+pymysql://${DB_USER}:${DB_PASSWORD}@db/${DB_NAME}"
REDIS_URL: "${REDIS_URL:-redis://redis:6379/0}"
GOTENBERG_URL: "${GOTENBERG_URL:-http://gotenberg:3000}"
PYTHONPATH: /app
command: ["rq", "worker", "conversions"]
networks:
- infoscreen-net
volumes:
server-pip-cache:
db-data:
media-data: