feat: mumuainovel app service infrastructure (db+compose+nginx)

This commit is contained in:
QihuAI Design committed 2026-07-28 11:41:40 +08:00
1 parent a9d8642db5
commit 96aabc31f6
3 files changed
+127

No files matched your search

+36
View File
@@ -0,0 +1,36 @@
# MuMuAINovel OIDC Sidecar - Platform Authentication Proxy
# Authenticates platform JWT via nginx auth_request, passes user to MuMuAINovel
server {
listen 4180;
# Platform JWT verification endpoint (internal subrequest)
auth_request /platform-auth;
auth_request_set $auth_user_id $upstream_http_x_user_id;
auth_request_set $auth_user_name $upstream_http_x_user_name;
# Proxy to MuMuAINovel
location / {
proxy_pass http://mumuainovel:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Platform-User-Id $auth_user_id;
proxy_set_header X-Platform-User-Name $auth_user_name;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 600s;
}
# Auth subrequest - validate platform JWT
location = /platform-auth {
internal;
proxy_pass http://qihu-aiflow:18080/app/api/auth/verify;
proxy_pass_request_body off;
proxy_set_header Content-Length "";
proxy_set_header X-Original-URI $request_uri;
proxy_set_header Authorization $http_authorization;
proxy_set_header Cookie $http_cookie;
}
}
+33
View File
@@ -118,6 +118,39 @@ services:
networks: networks:
- aiflow-network - aiflow-network
# MuMuAINovel - AI Novel Creation (Phase2 App Service #1)
mumuainovel:
image: mumujie/mumuainovel:latest
container_name: qihu-aiflow-mumuainovel
restart: unless-stopped
networks:
- aiflow-network
environment:
- OPENAI_BASE_URL=http://qihu-aiflow-litellm:4000/v1
- OPENAI_API_KEY=sk-litellm-master-key-aiflow-2026
- DEFAULT_AI_PROVIDER=openai
- DEFAULT_MODEL=deepseek-v4-flash
- POSTGRES_HOST=qihu-aiflow-pg18
- POSTGRES_DB=mumuainovel
- POSTGRES_USER=aiflow
- POSTGRES_PASSWORD=pwd2026
- LOCAL_AUTH_ENABLED=true
- LOCAL_AUTH_USERNAME=mumu_admin
- LOCAL_AUTH_PASSWORD=mumu_admin_2026
- LINUXDO_AUTH_ENABLED=false
# MuMuAINovel OIDC Sidecar (GPL compliance boundary)
mumuainovel-oidc:
image: nginx:alpine
container_name: qihu-aiflow-mumuainovel-oidc
restart: unless-stopped
networks:
- aiflow-network
volumes:
- ./config/nginx/mumuainovel-oidc.conf:/etc/nginx/conf.d/default.conf
depends_on:
- mumuainovel
volumes: volumes:
redis_data: redis_data:
meilisearch_data: meilisearch_data:
+58
View File
@@ -0,0 +1,58 @@
#!/bin/bash
# MuMuAINovel Deployment Script
# Run when Docker Hub / GitHub are accessible
# ============================================
set -e
echo "=== MuMuAINovel Deployment ==="
# Step 1: Database
echo "[1/4] Creating mumuainovel database..."
docker exec qihu-aiflow-pg18 psql -U aiflow -d aiflow -c "CREATE DATABASE mumuainovel OWNER aiflow;" 2>/dev/null || echo " Database already exists"
# Step 2: Pull image
echo "[2/4] Pulling MuMuAINovel image..."
# Try Docker Hub direct first, then proxies
docker pull mumujie/mumuainovel:latest 2>/dev/null || {
echo " Docker Hub failed, trying mirror..."
docker pull docker.1ms.run/mumujie/mumuainovel:latest 2>/dev/null || {
echo " Mirror failed, building from source..."
cd /tmp && rm -rf MuMuAINovel
git clone --depth 1 https://github.com/xiamuceer-j/MuMuAINovel.git
cd MuMuAINovel && docker build -t mumujie/mumuainovel:latest .
}
}
# Step 3: Start container
echo "[3/4] Starting MuMuAINovel..."
docker stop qihu-aiflow-mumuainovel 2>/dev/null || true
docker rm qihu-aiflow-mumuainovel 2>/dev/null || true
docker run -d \
--name qihu-aiflow-mumuainovel \
--network qihuaiflow_aiflow-network \
--restart unless-stopped \
-e OPENAI_BASE_URL=http://qihu-aiflow-litellm:4000/v1 \
-e OPENAI_API_KEY=sk-litellm-master-key-aiflow-2026 \
-e DEFAULT_AI_PROVIDER=openai \
-e DEFAULT_MODEL=deepseek-v4-flash \
-e POSTGRES_HOST=qihu-aiflow-pg18 \
-e POSTGRES_DB=mumuainovel \
-e POSTGRES_USER=aiflow \
-e POSTGRES_PASSWORD=pwd2026 \
-e LOCAL_AUTH_ENABLED=true \
-e LOCAL_AUTH_USERNAME=mumu_admin \
-e LOCAL_AUTH_PASSWORD=mumu_admin_2026 \
-e LINUXDO_AUTH_ENABLED=false \
mumujie/mumuainovel:latest
# Step 4: Verify
echo "[4/4] Waiting for startup..."
sleep 15
docker ps --format "{{.Names}} {{.Status}}" | grep mumu
curl -s -o /dev/null -w "HTTP %{http_code}" http://localhost:18001/ && echo " - MuMuAINovel is UP" || echo " - Not ready yet"
echo "=== Done ==="
echo "Access: http://210.16.161.218:18001"
echo "Login: mumu_admin / mumu_admin_2026"
echo "AI: powered by LiteLLM gateway (deepseek-v4-flash)"