Skip to content

Commit cc61449

Browse files
qin-ctxclaude
authored andcommitted
feat(docs,ci): 完善云上部署文档与 Docker CI 流程 (#320)
- release workflow 新增 Docker 镜像构建推送至 GHCR - 重写 examples/cloud/GUIDE.md 云上部署指南,补充架构概览、systemd/Docker/Helm 三种部署方式、多租户管理、FAQ 等章节 - ov.conf.example 占位符改为 <your-xxx> 格式,移除 rerank 配置 - 中英文部署文档(docs/zh|en/guides/03-deployment.md)对齐:Docker 改用 GHCR 预构建镜像,Kubernetes 改用 Helm chart,并引用 GUIDE.md Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 1d8c8b6 commit cc61449

File tree

5 files changed

+563
-305
lines changed

5 files changed

+563
-305
lines changed

.github/workflows/release.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,3 +153,51 @@ jobs:
153153
VERSION=$(ls dist/*.whl | head -n 1 | xargs basename | cut -d- -f2)
154154
echo "Successfully published to PyPI with version: $VERSION"
155155
echo "::notice::Successfully published to PyPI with version: $VERSION"
156+
157+
docker:
158+
name: Build and Push Docker Image
159+
needs: [build, permission-check]
160+
if: >-
161+
needs.permission-check.outputs.allowed == 'true' &&
162+
github.event_name == 'release'
163+
runs-on: ubuntu-latest
164+
permissions:
165+
contents: read
166+
packages: write
167+
attestations: write
168+
id-token: write
169+
steps:
170+
- name: Checkout repository
171+
uses: actions/checkout@v6
172+
with:
173+
submodules: recursive
174+
175+
- name: Log in to the Container registry
176+
uses: docker/login-action@v3
177+
with:
178+
registry: ghcr.io
179+
username: ${{ github.actor }}
180+
password: ${{ secrets.GITHUB_TOKEN }}
181+
182+
- name: Extract metadata (tags, labels) for Docker
183+
id: meta
184+
uses: docker/metadata-action@v5
185+
with:
186+
images: ghcr.io/${{ github.repository }}
187+
188+
- name: Set up QEMU
189+
uses: docker/setup-qemu-action@v3
190+
191+
- name: Set up Docker Buildx
192+
uses: docker/setup-buildx-action@v3
193+
194+
- name: Build and push Docker image
195+
uses: docker/build-push-action@v5
196+
with:
197+
context: .
198+
platforms: linux/amd64,linux/arm64
199+
push: true
200+
tags: ${{ steps.meta.outputs.tags }}
201+
labels: ${{ steps.meta.outputs.labels }}
202+
build-args: |
203+
OPENVIKING_VERSION=${{ github.event.release.tag_name }}

docs/en/guides/03-deployment.md

Lines changed: 25 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -197,83 +197,38 @@ curl http://localhost:1933/api/v1/fs/ls?uri=viking:// \
197197

198198
### Docker
199199

200-
```dockerfile
201-
FROM python:3.11-slim
202-
WORKDIR /app
203-
COPY . .
204-
RUN pip install -e .
205-
EXPOSE 1933
206-
CMD ["python", "-m", "openviking", "serve", "--config", "/etc/openviking/ov.conf"]
200+
OpenViking provides pre-built Docker images published to GitHub Container Registry:
201+
202+
```bash
203+
docker run -d \
204+
--name openviking \
205+
-p 1933:1933 \
206+
-v ~/.openviking/ov.conf:/app/ov.conf \
207+
-v /var/lib/openviking/data:/app/data \
208+
--restart unless-stopped \
209+
ghcr.io/volcengine/openviking:main
207210
```
208211

212+
You can also use Docker Compose with the `docker-compose.yml` provided in the project root:
213+
209214
```bash
210-
docker build -t openviking .
211-
docker run -d -p 1933:1933 \
212-
-v /path/to/ov.conf:/etc/openviking/ov.conf:ro \
213-
-v /data/openviking:/data/openviking \
214-
openviking
215+
docker compose up -d
215216
```
216217

217-
### Kubernetes
218-
219-
```yaml
220-
apiVersion: apps/v1
221-
kind: Deployment
222-
metadata:
223-
name: openviking
224-
spec:
225-
replicas: 1
226-
selector:
227-
matchLabels:
228-
app: openviking
229-
template:
230-
metadata:
231-
labels:
232-
app: openviking
233-
spec:
234-
containers:
235-
- name: openviking
236-
image: openviking:latest
237-
ports:
238-
- containerPort: 1933
239-
volumeMounts:
240-
- name: config
241-
mountPath: /etc/openviking
242-
readOnly: true
243-
- name: data
244-
mountPath: /data/openviking
245-
livenessProbe:
246-
httpGet:
247-
path: /health
248-
port: 1933
249-
initialDelaySeconds: 5
250-
periodSeconds: 10
251-
readinessProbe:
252-
httpGet:
253-
path: /ready
254-
port: 1933
255-
initialDelaySeconds: 10
256-
periodSeconds: 15
257-
volumes:
258-
- name: config
259-
configMap:
260-
name: openviking-config
261-
- name: data
262-
persistentVolumeClaim:
263-
claimName: openviking-data
264-
---
265-
apiVersion: v1
266-
kind: Service
267-
metadata:
268-
name: openviking
269-
spec:
270-
selector:
271-
app: openviking
272-
ports:
273-
- port: 1933
274-
targetPort: 1933
218+
To build the image yourself: `docker build -t openviking:latest .`
219+
220+
### Kubernetes + Helm
221+
222+
The project provides a Helm chart located at `examples/k8s-helm/`:
223+
224+
```bash
225+
helm install openviking ./examples/k8s-helm \
226+
--set openviking.config.embedding.dense.api_key="YOUR_API_KEY" \
227+
--set openviking.config.vlm.api_key="YOUR_API_KEY"
275228
```
276229

230+
For a detailed cloud deployment guide (including Volcengine TOS + VikingDB + Ark configuration), see the [Cloud Deployment Guide](../../../examples/cloud/GUIDE.md).
231+
277232
## Health Checks
278233

279234
| Endpoint | Auth | Purpose |

docs/zh/guides/03-deployment.md

Lines changed: 25 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -191,83 +191,38 @@ curl http://localhost:1933/api/v1/fs/ls?uri=viking:// \
191191

192192
### Docker
193193

194-
```dockerfile
195-
FROM python:3.11-slim
196-
WORKDIR /app
197-
COPY . .
198-
RUN pip install -e .
199-
EXPOSE 1933
200-
CMD ["python", "-m", "openviking", "serve", "--config", "/etc/openviking/ov.conf"]
194+
OpenViking 提供预构建的 Docker 镜像,发布在 GitHub Container Registry:
195+
196+
```bash
197+
docker run -d \
198+
--name openviking \
199+
-p 1933:1933 \
200+
-v ~/.openviking/ov.conf:/app/ov.conf \
201+
-v /var/lib/openviking/data:/app/data \
202+
--restart unless-stopped \
203+
ghcr.io/volcengine/openviking:main
201204
```
202205

206+
也可以使用 Docker Compose,项目根目录提供了 `docker-compose.yml`
207+
203208
```bash
204-
docker build -t openviking .
205-
docker run -d -p 1933:1933 \
206-
-v /path/to/ov.conf:/etc/openviking/ov.conf:ro \
207-
-v /data/openviking:/data/openviking \
208-
openviking
209+
docker compose up -d
209210
```
210211

211-
### Kubernetes
212-
213-
```yaml
214-
apiVersion: apps/v1
215-
kind: Deployment
216-
metadata:
217-
name: openviking
218-
spec:
219-
replicas: 1
220-
selector:
221-
matchLabels:
222-
app: openviking
223-
template:
224-
metadata:
225-
labels:
226-
app: openviking
227-
spec:
228-
containers:
229-
- name: openviking
230-
image: openviking:latest
231-
ports:
232-
- containerPort: 1933
233-
volumeMounts:
234-
- name: config
235-
mountPath: /etc/openviking
236-
readOnly: true
237-
- name: data
238-
mountPath: /data/openviking
239-
livenessProbe:
240-
httpGet:
241-
path: /health
242-
port: 1933
243-
initialDelaySeconds: 5
244-
periodSeconds: 10
245-
readinessProbe:
246-
httpGet:
247-
path: /ready
248-
port: 1933
249-
initialDelaySeconds: 10
250-
periodSeconds: 15
251-
volumes:
252-
- name: config
253-
configMap:
254-
name: openviking-config
255-
- name: data
256-
persistentVolumeClaim:
257-
claimName: openviking-data
258-
---
259-
apiVersion: v1
260-
kind: Service
261-
metadata:
262-
name: openviking
263-
spec:
264-
selector:
265-
app: openviking
266-
ports:
267-
- port: 1933
268-
targetPort: 1933
212+
如需自行构建镜像:`docker build -t openviking:latest .`
213+
214+
### Kubernetes + Helm
215+
216+
项目提供了 Helm chart,位于 `examples/k8s-helm/`
217+
218+
```bash
219+
helm install openviking ./examples/k8s-helm \
220+
--set openviking.config.embedding.dense.api_key="YOUR_API_KEY" \
221+
--set openviking.config.vlm.api_key="YOUR_API_KEY"
269222
```
270223

224+
详细的云上部署指南(包括火山引擎 TOS + VikingDB + 方舟配置)请参考 [云上部署指南](../../../examples/cloud/GUIDE.md)
225+
271226
## 健康检查
272227

273228
| 端点 | 认证 | 用途 |

0 commit comments

Comments
 (0)