Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
NUXT_PUBLIC_API_URL=https://kms.ikxin.com
NUXT_PUBLIC_I18N_BASE_URL=https://kms.ikxin.com
NUXT_MONITOR_LIST=kms.org.cn,win.freekms.cn
NUXT_ENABLE_VLMCSD=false
NUXT_MONITOR_INTERVAL=10
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
- 新增暗色模式支持(亮色 / 暗色 / 跟随系统)
- 新增国际化支持(简体中文 / English)
- 新增 ECharts 图表可视化监控数据
- 新增内置 VLMCSD 服务(可选启用)
- 新增定时任务自动监控 KMS 服务器状态

### 🛠️ Improvements
Expand Down
19 changes: 14 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
FROM node:20-slim AS builder
FROM alpine:latest AS vlmcsd-builder

WORKDIR /root

RUN apk add --no-cache git make build-base && \
git clone --branch master --single-branch https://github.com/Wind4/vlmcsd.git && \
cd vlmcsd/ && \
make

FROM node:20-slim AS app-builder

WORKDIR /app

Expand All @@ -12,10 +21,10 @@ RUN NITRO_PRESET=node-server pnpm run build

FROM node:20-slim

COPY --from=builder /app/.output /app/.output
COPY --from=builder /app/binaries /app/binaries
COPY --from=vlmcsd-builder /root/vlmcsd/bin/vlmcsd /usr/bin/vlmcsd
COPY --from=app-builder /app/.output /app/.output

RUN chmod -R +x /app/binaries
RUN chmod +x /usr/bin/vlmcsd

WORKDIR /app

Expand All @@ -26,4 +35,4 @@ EXPOSE 3000 1688
ENV HOST=0.0.0.0
ENV PORT=3000

CMD ["node", ".output/server/index.mjs"]
CMD ["sh", "-c", "/usr/bin/vlmcsd -D -e & node .output/server/index.mjs"]
13 changes: 6 additions & 7 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,12 @@ The static version uses https://kms.ikxin.com API by default. You can deploy you

### Environment Variables

| Name | Example | Description |
| -------------------------- | --------------------------- | ---------------------------------------------------------------------- |
| `NUXT_PUBLIC_API_URL` | `https://kms.ikxin.com` | API URL for the static version |
| `NUXT_MONITOR_LIST` | `kms.org.cn,win.freekms.cn` | Custom KMS server monitoring list, separated by `,` |
| `NUXT_MONITOR_INTERVAL` | `10` | Monitoring interval in seconds, default is 10 |
| `NUXT_ENABLE_VLMCSD` | `false` | Whether to enable the built-in VLMCSD service |
| `PORT` | `3000` | Server listening port (also accepts `NITRO_PORT`) |
| Name | Example | Description |
| ----------------------- | --------------------------- | --------------------------------------------------- |
| `NUXT_PUBLIC_API_URL` | `https://kms.ikxin.com` | API URL for the static version |
| `NUXT_MONITOR_LIST` | `kms.org.cn,win.freekms.cn` | Custom KMS server monitoring list, separated by `,` |
| `NUXT_MONITOR_INTERVAL` | `10` | Monitoring interval in seconds, default is 10 |
| `PORT` | `3000` | Server listening port (also accepts `NITRO_PORT`) |

> [!NOTE]
> The production server (`node .output/server/index.mjs`) does **not** automatically load `.env` files. Environment variables must be set in the system environment or your deployment platform before starting the server. The `.env` file is only used during development and the build phase.
Expand Down
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,12 @@ https://kms.ikxin.com

### 环境变量

| 名称 | 示例值 | 描述 |
| -------------------------- | --------------------------- | ----------------------------------------------------------------- |
| `NUXT_PUBLIC_API_URL` | `https://kms.ikxin.com` | 静态版本 API 接口地址 |
| `NUXT_MONITOR_LIST` | `kms.org.cn,win.freekms.cn` | 自定义监控 KMS 服务器列表,使用 `,` 分隔 |
| `NUXT_MONITOR_INTERVAL` | `10` | 监控频率,单位为秒,默认 10 秒 |
| `NUXT_ENABLE_VLMCSD` | `false` | 是否启用内置 VLMCSD 服务 |
| `PORT` | `3000` | 服务监听端口(也可使用 `NITRO_PORT`) |
| 名称 | 示例值 | 描述 |
| ----------------------- | --------------------------- | ---------------------------------------- |
| `NUXT_PUBLIC_API_URL` | `https://kms.ikxin.com` | 静态版本 API 接口地址 |
| `NUXT_MONITOR_LIST` | `kms.org.cn,win.freekms.cn` | 自定义监控 KMS 服务器列表,使用 `,` 分隔 |
| `NUXT_MONITOR_INTERVAL` | `10` | 监控频率,单位为秒,默认 10 秒 |
| `PORT` | `3000` | 服务监听端口(也可使用 `NITRO_PORT`) |

> [!NOTE]
> 生产环境(`node .output/server/index.mjs`)不会自动读取 `.env` 文件,环境变量需要在运行前通过系统环境或部署平台进行配置。`.env` 文件仅在开发和构建阶段有效。
Expand Down
Binary file removed binaries/vlmcsd-darwin-arm64
Binary file not shown.
Binary file removed binaries/vlmcsd-darwin-x64
Binary file not shown.
Binary file removed binaries/vlmcsd-linux-arm64
Binary file not shown.
Binary file removed binaries/vlmcsd-linux-x64
Binary file not shown.
1 change: 0 additions & 1 deletion nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ export default defineNuxtConfig({
},
runtimeConfig: {
monitorList: '',
enableVlmcsd: '',
monitorInterval: '10',
public: {
apiUrl: '',
Expand Down
35 changes: 0 additions & 35 deletions server/plugins/vlmcsd.ts

This file was deleted.

Loading