mirror of
https://github.com/Moe-Sakura/Wrangler-API.git
synced 2026-04-04 07:35:08 +08:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
73ad909a2f |
15
Dockerfile
15
Dockerfile
@@ -1,9 +1,20 @@
|
|||||||
FROM node:20-alpine
|
FROM node:20-bookworm-slim
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
RUN if [ -f /etc/apt/sources.list ]; then \
|
||||||
|
sed -i 's|http://deb.debian.org/debian|http://mirrors.aliyun.com/debian|g' /etc/apt/sources.list; \
|
||||||
|
sed -i 's|http://security.debian.org/debian-security|http://mirrors.aliyun.com/debian-security|g' /etc/apt/sources.list || true; \
|
||||||
|
elif [ -f /etc/apt/sources.list.d/debian.sources ]; then \
|
||||||
|
sed -i 's|http://deb.debian.org/debian|http://mirrors.aliyun.com/debian|g' /etc/apt/sources.list.d/debian.sources; \
|
||||||
|
sed -i 's|http://security.debian.org/debian-security|http://mirrors.aliyun.com/debian-security|g' /etc/apt/sources.list.d/debian.sources || true; \
|
||||||
|
fi \
|
||||||
|
&& apt-get update \
|
||||||
|
&& apt-get install -y --no-install-recommends ca-certificates \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
RUN npm ci
|
RUN npm ci --include=optional
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
|||||||
@@ -24,8 +24,8 @@ npx wrangler publish
|
|||||||
## Docker
|
## Docker
|
||||||
### 本地运行
|
### 本地运行
|
||||||
```bash
|
```bash
|
||||||
docker build -t wrangler-api:local .
|
docker build -t searchgal-api:main .
|
||||||
docker run --rm -p 8787:8787 wrangler-api:local
|
docker run --rm -p 8787:8787 searchgal-api:main
|
||||||
```
|
```
|
||||||
|
|
||||||
## API 使用
|
## API 使用
|
||||||
|
|||||||
Reference in New Issue
Block a user