forked from boos/BoosAPI
feat: 更新 Dockerfile
This commit is contained in:
@@ -204,7 +204,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: docker/Dockerfile
|
file: docker/Dockerfile
|
||||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
platforms: linux/amd64,linux/arm64
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ Metapi 作为这些中转站之上的聚合层,把多个站点统一到 **一
|
|||||||
### 📦 轻量部署
|
### 📦 轻量部署
|
||||||
|
|
||||||
- **单 Docker 容器**,内置 SQLite,无外部依赖
|
- **单 Docker 容器**,内置 SQLite,无外部依赖
|
||||||
- Debian slim 基础镜像,兼顾兼容性与体积
|
- Alpine 基础镜像,体积精简
|
||||||
- 数据完整导入导出,迁移无忧
|
- 数据完整导入导出,迁移无忧
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -499,7 +499,7 @@ location / {
|
|||||||
| **数据库** | SQLite ([better-sqlite3](https://github.com/WiseLibs/better-sqlite3)) + [Drizzle ORM](https://orm.drizzle.team) |
|
| **数据库** | SQLite ([better-sqlite3](https://github.com/WiseLibs/better-sqlite3)) + [Drizzle ORM](https://orm.drizzle.team) |
|
||||||
| **数据可视化** | [VChart](https://visactor.io/vchart) (@visactor/react-vchart) |
|
| **数据可视化** | [VChart](https://visactor.io/vchart) (@visactor/react-vchart) |
|
||||||
| **定时任务** | [node-cron](https://github.com/node-cron/node-cron) |
|
| **定时任务** | [node-cron](https://github.com/node-cron/node-cron) |
|
||||||
| **容器化** | Docker (Debian slim) + Docker Compose |
|
| **容器化** | Docker (Alpine) + Docker Compose |
|
||||||
| **测试** | [Vitest](https://vitest.dev) |
|
| **测试** | [Vitest](https://vitest.dev) |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
+2
-2
@@ -183,7 +183,7 @@ Alert scenarios: low balance warning, site/account anomalies, check-in failures,
|
|||||||
### Lightweight Deployment
|
### Lightweight Deployment
|
||||||
|
|
||||||
- **Single Docker container** with built-in SQLite — no external dependencies
|
- **Single Docker container** with built-in SQLite — no external dependencies
|
||||||
- Debian slim base image, balancing compatibility and image size
|
- Alpine base image, minimal footprint
|
||||||
- Full data import/export for worry-free migration
|
- Full data import/export for worry-free migration
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -499,7 +499,7 @@ For detailed integration instructions: [docs/client-integration.md](docs/client-
|
|||||||
| **Database** | SQLite ([better-sqlite3](https://github.com/WiseLibs/better-sqlite3)) + [Drizzle ORM](https://orm.drizzle.team) |
|
| **Database** | SQLite ([better-sqlite3](https://github.com/WiseLibs/better-sqlite3)) + [Drizzle ORM](https://orm.drizzle.team) |
|
||||||
| **Charts** | [VChart](https://visactor.io/vchart) (@visactor/react-vchart) |
|
| **Charts** | [VChart](https://visactor.io/vchart) (@visactor/react-vchart) |
|
||||||
| **Scheduling** | [node-cron](https://github.com/node-cron/node-cron) |
|
| **Scheduling** | [node-cron](https://github.com/node-cron/node-cron) |
|
||||||
| **Containerization** | Docker (Debian slim) + Docker Compose |
|
| **Containerization** | Docker (Alpine) + Docker Compose |
|
||||||
| **Testing** | [Vitest](https://vitest.dev) |
|
| **Testing** | [Vitest](https://vitest.dev) |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
FROM node:20-bookworm-slim AS builder
|
FROM node:20-alpine AS builder
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
@@ -9,7 +9,7 @@ COPY . .
|
|||||||
RUN npm run build
|
RUN npm run build
|
||||||
RUN npm prune --omit=dev
|
RUN npm prune --omit=dev
|
||||||
|
|
||||||
FROM node:20-bookworm-slim
|
FROM node:20-alpine
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user