update mih ui with stable flutter and optimised docker file caching

This commit is contained in:
2026-04-24 13:07:20 +02:00
parent 3e3170b103
commit c2353fef20
2 changed files with 47 additions and 45 deletions

View File

@@ -4,21 +4,21 @@ networks:
driver: bridge
#============== MIH Containers ====================================================================
services:
#============== Nginx Proxy Manager ====================================================================
#============== Nginx Proxy Manager ====================================================================
mih-nginx:
container_name: mih-nginx
image: 'jc21/nginx-proxy-manager:latest'
image: "jc21/nginx-proxy-manager:latest"
restart: unless-stopped
ports:
- '80:80' # Public HTTP
- '443:443' # Public HTTPS
- '127.0.0.1:81:81' # Admin Web Port
- "80:80" # Public HTTP
- "443:443" # Public HTTPS
- "127.0.0.1:81:81" # Admin Web Port
volumes:
- ./mih_nginx/data:/data
- ./mih_nginx/letsencrypt:/etc/letsencrypt
networks:
- mih-network
#============== GITEA ====================================================================
#============== GITEA ====================================================================
mih-gitea:
image: gitea/gitea:latest
container_name: mih-gitea
@@ -68,11 +68,11 @@ services:
depends_on:
- mih-db
ports:
- '127.0.0.1:3567:3567'
- "127.0.0.1:3567:3567"
environment:
REFRESH_TOKEN_VALIDITY: '604800'
ACCESS_TOKEN_VALIDITY: '86400'
PASSWORD_RESET_TOKEN_LIFETIME: '7200000'
REFRESH_TOKEN_VALIDITY: "604800"
ACCESS_TOKEN_VALIDITY: "86400"
PASSWORD_RESET_TOKEN_LIFETIME: "7200000"
MYSQL_USER: ${SQL_USER}
MYSQL_PASSWORD: ${SQL_USER_PW}
MYSQL_HOST: mih-db
@@ -94,7 +94,7 @@ services:
image: wordpress
restart: always
ports:
- '127.0.0.1:8081:80'
- "127.0.0.1:8081:80"
environment:
WORDPRESS_DB_HOST: mih-wp-db
WORDPRESS_DB_USER: ${WP_SQL_USER}
@@ -112,7 +112,7 @@ services:
MARIADB_DATABASE: ${WP_SQL_DB}
MARIADB_USER: ${WP_SQL_USER}
MARIADB_PASSWORD: ${WP_SQL_USER_PW}
MARIADB_RANDOM_ROOT_PASSWORD: '1'
MARIADB_RANDOM_ROOT_PASSWORD: "1"
volumes:
- ./mih_wp/database:/var/lib/mysql
networks:
@@ -142,7 +142,7 @@ services:
- mih-network
depends_on:
- mih-db
#============== My SQL DB ====================================================================
#============== My SQL DB ====================================================================
mih-db:
platform: linux/amd64
image: mysql:5.7
@@ -156,10 +156,10 @@ services:
networks:
- mih-network
ports:
- '127.0.0.1:3306:3306'
- "127.0.0.1:3306:3306"
volumes:
- ./mih_db:/var/lib/mysql
#============== PHP My Admin ====================================================================
#============== PHP My Admin ====================================================================
# phpmyadmin:
# platform: linux/amd64
# image: phpmyadmin/phpmyadmin
@@ -175,41 +175,41 @@ services:
# - 8081:80
# depends_on:
# - mih-db
#============== Minio File Storage ====================================================================
#============== Minio File Storage ====================================================================
mih-minio:
platform: linux/amd64
container_name: mih-minio
hostname: mih-minio
image: minio/minio
ports:
- '127.0.0.1:9000:9000'
- '127.0.0.1:9001:9001'
- "127.0.0.1:9000:9000"
- "127.0.0.1:9001:9001"
volumes:
- './mih_minio:/data'
- "./mih_minio:/data"
environment:
MINIO_ROOT_USER: ${MINIO_ROOT_USER}
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PW}
networks:
- mih-network
command: ["server", "/data", "--console-address", ":9001"]
#============== MIH-Monitor Portainer ====================================================================
#============== MIH-Monitor Portainer ====================================================================
mih-monitor:
container_name: mih-monitor
image: portainer/portainer-ce:2.20.3
ports:
- '127.0.0.1:9444:9443'
- "127.0.0.1:9444:9443"
volumes:
- ./mih_monitor/data:/data
- /var/run/docker.sock:/var/run/docker.sock
restart: unless-stopped
networks:
- mih-network
#============== MIH-AI Ollama ====================================================================
#============== MIH-AI Ollama ====================================================================
mih-ai:
container_name: mih-ai
image: ollama/ollama:latest
image: ollama/ollama:0.21.2
ports:
- '127.0.0.1:11434:11434'
- "127.0.0.1:11434:11434"
volumes:
- ./mih_ai/ollama/ollama:/root/.ollama
pull_policy: always
@@ -222,15 +222,15 @@ services:
networks:
- mih-network
# === Added section for NVIDIA GPU acceleration ===
# runtime: nvidia
# deploy:
# resources:
# reservations:
# devices:
# - driver: nvidia
# count: all # or specify a number of GPUs
# capabilities: [ gpu ]
#============== Firebaase ====================================================================
# runtime: nvidia
# deploy:
# resources:
# reservations:
# devices:
# - driver: nvidia
# count: all # or specify a number of GPUs
# capabilities: [ gpu ]
#============== Firebaase ====================================================================
# firebase:
# container_name: MIH-firebase-emulator
# build:

View File

@@ -3,17 +3,19 @@ FROM debian:latest AS build-env
# Install necessary dependencies for Flutter
RUN apt-get update && apt-get install -y \
curl git wget unzip libglu1-mesa fonts-droid-fallback python3 \
&& rm -rf /var/lib/apt/lists/*
curl git wget unzip libglu1-mesa fonts-droid-fallback python3 \
&& rm -rf /var/lib/apt/lists/*
# Clone Flutter SDK
RUN git clone -b flutter-3.32-candidate.0 https://github.com/flutter/flutter.git /usr/local/flutter
RUN git clone -b stable https://github.com/flutter/flutter.git /usr/local/flutter
ENV PATH="/usr/local/flutter/bin:/usr/local/flutter/bin/cache/dart-sdk/bin:${PATH}"
# Build the Flutter web app
RUN flutter config --enable-web && flutter precache --web
WORKDIR /app
COPY pubspec.yaml pubspec.lock ./
RUN flutter pub get
COPY . .
RUN flutter config --enable-web
RUN flutter build web --release -t ./lib/main_prod.dart
# --- STAGE 2: The Final Production Image ---
@@ -24,13 +26,13 @@ COPY --from=build-env /app/build/web /usr/share/nginx/html
# Create the Nginx config inside the Dockerfile to handle SPA routing
RUN echo 'server { \
listen 83; \
location / { \
root /usr/share/nginx/html; \
index index.html; \
try_files $uri $uri/ /index.html; \
} \
}' > /etc/nginx/conf.d/default.conf
listen 83; \
location / { \
root /usr/share/nginx/html; \
index index.html; \
try_files $uri $uri/ /index.html; \
} \
}' > /etc/nginx/conf.d/default.conf
EXPOSE 83
CMD ["nginx", "-g", "daemon off;"]
CMD ["nginx", "-g", "daemon off;"]