mirror of
https://github.com/Moe-Sakura/Wrangler-API.git
synced 2026-03-19 04:59:46 +08:00
feat: 添加 Docker 支持及 GitHub Actions 自动构建流
* 新增 Dockerfile,支持在 Node.js 环境下本地运行 API。 * 添加 GitHub Actions 工作流,实现镜像自动构建并推送到 Docker Hub。 * 支持多平台构建(linux/amd64, linux/arm64)。 * 在 README.md 中补充了 Docker 本地运行的操作指南。
This commit is contained in:
12
Dockerfile
Normal file
12
Dockerfile
Normal file
@@ -0,0 +1,12 @@
|
||||
FROM node:20-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package*.json ./
|
||||
RUN npm ci
|
||||
|
||||
COPY . .
|
||||
|
||||
EXPOSE 8787
|
||||
|
||||
CMD ["npx", "wrangler", "dev", "--local", "--ip", "0.0.0.0", "--port", "8787"]
|
||||
Reference in New Issue
Block a user