Tachostand in Graph hizugefügt
This commit is contained in:
@@ -1 +0,0 @@
|
||||
61d68266980b7a401e0798b0655eadef
|
||||
@@ -33,10 +33,10 @@ addEventListener("message", eventListener);
|
||||
if (!window._flutter) {
|
||||
window._flutter = {};
|
||||
}
|
||||
_flutter.buildConfig = {"engineRevision":"3452d735bd38224ef2db85ca763d862d6326b17f","builds":[{"compileTarget":"dart2js","renderer":"canvaskit","mainJsPath":"main.dart.js"},{}]};
|
||||
_flutter.buildConfig = {"engineRevision":"3452d735bd38224ef2db85ca763d862d6326b17f","builds":[{"compileTarget":"dart2js","renderer":"canvaskit","mainJsPath":"main.dart.js"}]};
|
||||
|
||||
_flutter.loader.load({
|
||||
serviceWorkerSettings: {
|
||||
serviceWorkerVersion: "40261541" /* Flutter's service worker is deprecated and will be removed in a future Flutter release. */
|
||||
serviceWorkerVersion: "151291587" /* Flutter's service worker is deprecated and will be removed in a future Flutter release. */
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
# Flutter Tank Web App - Deployment Dockerfile
|
||||
FROM nginx:alpine
|
||||
|
||||
# Remove default nginx website
|
||||
RUN rm -rf /usr/share/nginx/html/*
|
||||
|
||||
# Copy the built Flutter web app (exclude installDocker folder)
|
||||
COPY . /usr/share/nginx/html/
|
||||
RUN rm -rf /usr/share/nginx/html/installDocker
|
||||
|
||||
# Copy nginx configuration
|
||||
COPY installDocker/nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
# Expose port 80 (internally, mapped to 8888 externally)
|
||||
EXPOSE 80
|
||||
|
||||
# Start nginx
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
@@ -1,93 +0,0 @@
|
||||
# Flutter Tank Web App - Docker Deployment
|
||||
|
||||
Dieser Ordner enthält alle notwendigen Dateien für das Docker-Deployment der Flutter Tank Web App.
|
||||
|
||||
## 📋 Voraussetzungen
|
||||
|
||||
- Docker muss auf dem Server installiert sein
|
||||
- Port 8888 muss verfügbar sein
|
||||
|
||||
## 🚀 Deployment
|
||||
|
||||
### 1. Ordner auf Server kopieren
|
||||
|
||||
Kopieren Sie den kompletten `webserver` Ordner auf Ihren Server:
|
||||
|
||||
```bash
|
||||
scp -r webserver user@your-server:/path/to/destination/
|
||||
```
|
||||
|
||||
### 2. In den installDocker Ordner wechseln
|
||||
|
||||
```bash
|
||||
cd /path/to/destination/webserver/installDocker
|
||||
```
|
||||
|
||||
### 3. Deployment ausführen
|
||||
|
||||
```bash
|
||||
./deploy.sh
|
||||
```
|
||||
|
||||
Das Script führt automatisch folgende Schritte aus:
|
||||
- Stoppt und entfernt bestehende Container
|
||||
- Baut das Docker Image
|
||||
- Startet den Container auf Port 8888
|
||||
- Zeigt den Status an
|
||||
|
||||
## 🌐 Zugriff
|
||||
|
||||
Nach erfolgreichem Deployment ist die App erreichbar unter:
|
||||
- **Web App:** `http://your-server:8888`
|
||||
- **Health Check:** `http://your-server:8888/health`
|
||||
|
||||
## 🔧 Nützliche Befehle
|
||||
|
||||
```bash
|
||||
# Logs anzeigen
|
||||
docker logs flutter-tank-web-container
|
||||
|
||||
# Logs live verfolgen
|
||||
docker logs -f flutter-tank-web-container
|
||||
|
||||
# Container stoppen
|
||||
docker stop flutter-tank-web-container
|
||||
|
||||
# Container neustarten
|
||||
docker restart flutter-tank-web-container
|
||||
|
||||
# Container und Image entfernen
|
||||
docker stop flutter-tank-web-container
|
||||
docker rm flutter-tank-web-container
|
||||
docker rmi flutter-tank-web
|
||||
```
|
||||
|
||||
## 📁 Dateien
|
||||
|
||||
- **Dockerfile** - Docker Image Definition (nginx:alpine mit Flutter Web Build)
|
||||
- **nginx.conf** - Nginx Konfiguration mit Gzip, Caching und Flutter Routing
|
||||
- **deploy.sh** - Automatisches Deployment-Script
|
||||
- **README.md** - Diese Dokumentation
|
||||
|
||||
## 🔒 Sicherheit
|
||||
|
||||
Die nginx.conf enthält bereits:
|
||||
- Security Headers (X-Frame-Options, X-Content-Type-Options, X-XSS-Protection)
|
||||
- Gzip Kompression für bessere Performance
|
||||
- Caching für statische Assets (1 Jahr)
|
||||
- Client-side Routing Support für Flutter
|
||||
|
||||
## 🐛 Troubleshooting
|
||||
|
||||
**Container startet nicht:**
|
||||
```bash
|
||||
docker logs flutter-tank-web-container
|
||||
```
|
||||
|
||||
**Port bereits in Verwendung:**
|
||||
Ändern Sie in `deploy.sh` die Variable `PORT=8888` auf einen anderen Port.
|
||||
|
||||
**Berechtigungsprobleme:**
|
||||
```bash
|
||||
chmod +x deploy.sh
|
||||
```
|
||||
@@ -1,68 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Flutter Tank Web App - Deployment Script
|
||||
# This script builds and deploys the web app in a Docker container on port 8888
|
||||
|
||||
set -e
|
||||
|
||||
# Configuration
|
||||
IMAGE_NAME="flutter-tank-web"
|
||||
CONTAINER_NAME="flutter-tank-web-container"
|
||||
PORT=8888
|
||||
|
||||
echo "🚀 Starting deployment of Flutter Tank Web App..."
|
||||
echo "================================================"
|
||||
|
||||
# Stop and remove existing container if running
|
||||
if [ "$(docker ps -q -f name=$CONTAINER_NAME)" ]; then
|
||||
echo "⏹️ Stopping existing container..."
|
||||
docker stop $CONTAINER_NAME
|
||||
fi
|
||||
|
||||
if [ "$(docker ps -aq -f name=$CONTAINER_NAME)" ]; then
|
||||
echo "🗑️ Removing existing container..."
|
||||
docker rm $CONTAINER_NAME
|
||||
fi
|
||||
|
||||
# Remove old image (optional - comment out to keep old images)
|
||||
if [ "$(docker images -q $IMAGE_NAME)" ]; then
|
||||
echo "🗑️ Removing old image..."
|
||||
docker rmi $IMAGE_NAME || true
|
||||
fi
|
||||
|
||||
# Build new Docker image (from parent directory to include web files)
|
||||
echo "🔨 Building Docker image..."
|
||||
cd ..
|
||||
docker build -f installDocker/Dockerfile -t $IMAGE_NAME .
|
||||
cd installDocker
|
||||
|
||||
# Run container
|
||||
echo "🚀 Starting container on port $PORT..."
|
||||
docker run -d \
|
||||
--name $CONTAINER_NAME \
|
||||
-p $PORT:80 \
|
||||
--restart unless-stopped \
|
||||
$IMAGE_NAME
|
||||
|
||||
# Wait a moment for container to start
|
||||
sleep 2
|
||||
|
||||
# Check if container is running
|
||||
if [ "$(docker ps -q -f name=$CONTAINER_NAME)" ]; then
|
||||
echo ""
|
||||
echo "✅ Deployment successful!"
|
||||
echo "================================================"
|
||||
echo "🌐 Application is running at: http://localhost:$PORT"
|
||||
echo "🏥 Health check: http://localhost:$PORT/health"
|
||||
echo ""
|
||||
echo "Useful commands:"
|
||||
echo " View logs: docker logs $CONTAINER_NAME"
|
||||
echo " Follow logs: docker logs -f $CONTAINER_NAME"
|
||||
echo " Stop: docker stop $CONTAINER_NAME"
|
||||
echo " Restart: docker restart $CONTAINER_NAME"
|
||||
echo "================================================"
|
||||
else
|
||||
echo "❌ Error: Container failed to start"
|
||||
echo "Check logs with: docker logs $CONTAINER_NAME"
|
||||
exit 1
|
||||
fi
|
||||
@@ -1,35 +0,0 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
# Compression
|
||||
gzip on;
|
||||
gzip_vary on;
|
||||
gzip_min_length 1024;
|
||||
gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/xml+rss application/json application/javascript;
|
||||
|
||||
# Security headers
|
||||
add_header X-Frame-Options "SAMEORIGIN" always;
|
||||
add_header X-Content-Type-Options "nosniff" always;
|
||||
add_header X-XSS-Protection "1; mode=block" always;
|
||||
|
||||
# Cache static assets
|
||||
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
|
||||
expires 1y;
|
||||
add_header Cache-Control "public, immutable";
|
||||
}
|
||||
|
||||
# Flutter web routing - handle client-side routing
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
# Health check endpoint
|
||||
location /health {
|
||||
access_log off;
|
||||
return 200 "healthy\n";
|
||||
add_header Content-Type text/plain;
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user