initial feature/react-migration commit
This commit is contained in:
@@ -17,6 +17,7 @@ services:
|
||||
- dashboard
|
||||
networks:
|
||||
- infoscreen-net
|
||||
|
||||
db:
|
||||
image: mariadb:11.4.7
|
||||
container_name: infoscreen-db
|
||||
@@ -32,7 +33,6 @@ services:
|
||||
- "3306:3306"
|
||||
networks:
|
||||
- infoscreen-net
|
||||
# ✅ HINZUGEFÜGT: Healthcheck für MariaDB
|
||||
healthcheck:
|
||||
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
|
||||
interval: 30s
|
||||
@@ -48,13 +48,11 @@ services:
|
||||
- ./mosquitto/config:/mosquitto/config
|
||||
- ./mosquitto/data:/mosquitto/data
|
||||
- ./mosquitto/log:/mosquitto/log
|
||||
# ✅ HINZUGEFÜGT: MQTT-Ports explizit exponiert
|
||||
ports:
|
||||
- "1883:1883" # Standard MQTT
|
||||
- "9001:9001" # WebSocket (falls benötigt)
|
||||
networks:
|
||||
- infoscreen-net
|
||||
# ✅ HINZUGEFÜGT: Healthcheck für MQTT
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "mosquitto_pub -h localhost -t test -m 'health' || exit 1"]
|
||||
interval: 30s
|
||||
@@ -70,7 +68,6 @@ services:
|
||||
container_name: infoscreen-api
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
# ✅ GEÄNDERT: Erweiterte depends_on mit Healthcheck-Conditions
|
||||
db:
|
||||
condition: service_healthy
|
||||
mqtt:
|
||||
@@ -93,33 +90,36 @@ services:
|
||||
retries: 3
|
||||
start_period: 40s
|
||||
|
||||
# ✅ GEÄNDERT: Dashboard jetzt mit Node.js/React statt Python/Dash
|
||||
dashboard:
|
||||
build:
|
||||
context: ./dashboard
|
||||
dockerfile: Dockerfile
|
||||
# ✅ HINZUGEFÜGT: Build-Args für React Production Build
|
||||
args:
|
||||
- NODE_ENV=production
|
||||
- VITE_API_URL=${API_URL}
|
||||
image: infoscreen-dashboard:latest
|
||||
container_name: infoscreen-dashboard
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
# ✅ GEÄNDERT: Healthcheck-Condition für Server
|
||||
server:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
API_URL: ${API_URL}
|
||||
# ✅ GEÄNDERT: React-spezifische Umgebungsvariablen
|
||||
- VITE_API_URL=${API_URL}
|
||||
- NODE_ENV=production
|
||||
ports:
|
||||
- "8050:8050"
|
||||
- "3000:3000" # ✅ GEÄNDERT: Standard React/Vite Port
|
||||
networks:
|
||||
- infoscreen-net
|
||||
# ✅ GEÄNDERT: Healthcheck für React App
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8050/_alive"]
|
||||
test: ["CMD", "curl", "-f", "http://localhost:3000/"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 45s
|
||||
start_period: 30s
|
||||
|
||||
volumes:
|
||||
db-data:
|
||||
# mosquitto-conf:
|
||||
# mosquitto-data:
|
||||
# # ✅ HINZUGEFÜGT: Log-Volume für MQTT
|
||||
# mosquitto-logs:
|
||||
db-data:
|
||||
Reference in New Issue
Block a user