feat: 支持魔搭创空间 (ModelScope Studio) Docker 部署
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
# Easy-Vibe 魔搭创空间部署:排除不需要打入镜像的文件和目录
|
||||
node_modules
|
||||
.git
|
||||
.github
|
||||
.husky
|
||||
.trae
|
||||
.vscode
|
||||
docs/.vitepress/dist
|
||||
docs/.vitepress/cache
|
||||
temp
|
||||
assets
|
||||
.claude
|
||||
docs-readme
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
# ============================================================
|
||||
# Easy-Vibe 魔搭创空间 (ModelScope Studio) 部署镜像
|
||||
# 使用多阶段构建:先编译 VitePress 静态站点,再用 Nginx 提供服务
|
||||
# 魔搭要求服务端口为 7860,通过 nginx.conf 配置监听
|
||||
# ============================================================
|
||||
|
||||
# ---- 构建阶段:Node.js 编译 VitePress 文档站 ----
|
||||
FROM node:20-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json package-lock.json ./
|
||||
|
||||
RUN npm ci
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN npm run build
|
||||
|
||||
# ---- 运行阶段:Nginx 提供静态文件服务 ----
|
||||
FROM nginx:alpine
|
||||
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
COPY --from=builder /app/docs/.vitepress/dist /usr/share/nginx/html
|
||||
|
||||
EXPOSE 7860
|
||||
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
@@ -3,7 +3,7 @@
|
||||
xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
||||
<url>
|
||||
<loc>https://datawhalechina.github.io/easy-vibe/zh-cn/</loc>
|
||||
<lastmod>2026-04-02T13:48:55+08:00</lastmod>
|
||||
<lastmod>2026-05-14T12:39:03+08:00</lastmod>
|
||||
<changefreq>weekly</changefreq>
|
||||
<priority>1.0</priority>
|
||||
<xhtml:link rel="alternate" hreflang="zh-CN" href="https://datawhalechina.github.io/easy-vibe/zh-cn/"/>
|
||||
@@ -573,7 +573,7 @@
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://datawhalechina.github.io/easy-vibe/zh-cn/appendix/7-infrastructure-and-operations/load-balancing-gateway/</loc>
|
||||
<lastmod>2026-02-15T01:57:52+08:00</lastmod>
|
||||
<lastmod>2026-05-12T01:15:35+08:00</lastmod>
|
||||
<changefreq>weekly</changefreq>
|
||||
<priority>0.7</priority>
|
||||
<xhtml:link rel="alternate" hreflang="zh-CN" href="https://datawhalechina.github.io/easy-vibe/zh-cn/appendix/7-infrastructure-and-operations/load-balancing-gateway/"/>
|
||||
@@ -772,7 +772,7 @@
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://datawhalechina.github.io/easy-vibe/zh-cn/stage-1/ai-capabilities-through-games/</loc>
|
||||
<lastmod>2026-05-11T17:11:47+09:00</lastmod>
|
||||
<lastmod>2026-05-12T09:55:02+09:00</lastmod>
|
||||
<changefreq>weekly</changefreq>
|
||||
<priority>0.9</priority>
|
||||
<xhtml:link rel="alternate" hreflang="zh-CN" href="https://datawhalechina.github.io/easy-vibe/zh-cn/stage-1/ai-capabilities-through-games/"/>
|
||||
@@ -781,7 +781,7 @@
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://datawhalechina.github.io/easy-vibe/zh-cn/stage-1/appendix-a-product-thinking/</loc>
|
||||
<lastmod>2026-05-11T17:11:47+09:00</lastmod>
|
||||
<lastmod>2026-05-12T09:55:02+09:00</lastmod>
|
||||
<changefreq>weekly</changefreq>
|
||||
<priority>0.9</priority>
|
||||
<xhtml:link rel="alternate" hreflang="zh-CN" href="https://datawhalechina.github.io/easy-vibe/zh-cn/stage-1/appendix-a-product-thinking/"/>
|
||||
@@ -790,7 +790,7 @@
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://datawhalechina.github.io/easy-vibe/zh-cn/stage-1/appendix-articles/example0-1/vibe-coding-tools-snake-game-tutorial/</loc>
|
||||
<lastmod>2026-05-11T17:11:47+09:00</lastmod>
|
||||
<lastmod>2026-05-12T09:55:02+09:00</lastmod>
|
||||
<changefreq>weekly</changefreq>
|
||||
<priority>0.9</priority>
|
||||
<xhtml:link rel="alternate" hreflang="zh-CN" href="https://datawhalechina.github.io/easy-vibe/zh-cn/stage-1/appendix-articles/example0-1/vibe-coding-tools-snake-game-tutorial/"/>
|
||||
@@ -799,7 +799,7 @@
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://datawhalechina.github.io/easy-vibe/zh-cn/stage-1/appendix-articles/example0-2/vibe-coding-tools-build-website-with-ai-coding-and-design-agents/</loc>
|
||||
<lastmod>2026-05-11T17:11:47+09:00</lastmod>
|
||||
<lastmod>2026-05-12T09:55:02+09:00</lastmod>
|
||||
<changefreq>weekly</changefreq>
|
||||
<priority>0.9</priority>
|
||||
<xhtml:link rel="alternate" hreflang="zh-CN" href="https://datawhalechina.github.io/easy-vibe/zh-cn/stage-1/appendix-articles/example0-2/vibe-coding-tools-build-website-with-ai-coding-and-design-agents/"/>
|
||||
@@ -880,7 +880,7 @@
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://datawhalechina.github.io/easy-vibe/zh-cn/stage-1/building-prototype/</loc>
|
||||
<lastmod>2026-05-11T17:11:47+09:00</lastmod>
|
||||
<lastmod>2026-05-12T09:55:02+09:00</lastmod>
|
||||
<changefreq>weekly</changefreq>
|
||||
<priority>0.9</priority>
|
||||
<xhtml:link rel="alternate" hreflang="zh-CN" href="https://datawhalechina.github.io/easy-vibe/zh-cn/stage-1/building-prototype/"/>
|
||||
@@ -907,7 +907,7 @@
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://datawhalechina.github.io/easy-vibe/zh-cn/stage-1/integrating-ai-capabilities/</loc>
|
||||
<lastmod>2026-05-11T17:11:47+09:00</lastmod>
|
||||
<lastmod>2026-05-12T09:55:02+09:00</lastmod>
|
||||
<changefreq>weekly</changefreq>
|
||||
<priority>0.9</priority>
|
||||
<xhtml:link rel="alternate" hreflang="zh-CN" href="https://datawhalechina.github.io/easy-vibe/zh-cn/stage-1/integrating-ai-capabilities/"/>
|
||||
@@ -916,7 +916,7 @@
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://datawhalechina.github.io/easy-vibe/zh-cn/stage-1/introduction-to-ai-ide/</loc>
|
||||
<lastmod>2026-05-11T17:11:47+09:00</lastmod>
|
||||
<lastmod>2026-05-12T09:55:02+09:00</lastmod>
|
||||
<changefreq>weekly</changefreq>
|
||||
<priority>0.9</priority>
|
||||
<xhtml:link rel="alternate" hreflang="zh-CN" href="https://datawhalechina.github.io/easy-vibe/zh-cn/stage-1/introduction-to-ai-ide/"/>
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"$schema": "https://modelscope.cn/api/v1/studios/deploy_schema.json",
|
||||
"sdk_type": "docker",
|
||||
"resource_configuration": "platform/2v-cpu-16g-mem",
|
||||
"port": 7860
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
# ============================================================
|
||||
# Easy-Vibe 魔搭创空间 (ModelScope Studio) Nginx 配置
|
||||
# 为 VitePress 静态站点提供 Web 服务,监听魔搭要求的 7860 端口
|
||||
# ============================================================
|
||||
|
||||
server {
|
||||
listen 7860;
|
||||
server_name localhost;
|
||||
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
gzip on;
|
||||
gzip_types text/plain text/css application/json application/javascript text/xml application/xml text/javascript image/svg+xml;
|
||||
gzip_min_length 1024;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri.html $uri/ /index.html;
|
||||
}
|
||||
|
||||
location /assets/ {
|
||||
expires 1y;
|
||||
add_header Cache-Control "public, immutable";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user