Skip to content

Commit fe202c9

Browse files
committed
docs: update deployment guide to use ghcr.io pre-built images
1 parent 286a148 commit fe202c9

2 files changed

Lines changed: 56 additions & 24 deletions

File tree

‎docs/en/deployment-guide.md‎

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,19 @@ openssl rand -base64 24
194194

195195
### 3.3 Deploy
196196

197+
Pull the pre-built images from GitHub Container Registry and start all services:
198+
197199
```bash
200+
docker compose -f deploy/docker-compose.yml --env-file .env.production pull
198201
docker compose -f deploy/docker-compose.yml --env-file .env.production up -d
199202
```
200203

204+
To pin a specific release instead of `latest`:
205+
206+
```bash
207+
IMAGE_TAG=<git-sha> docker compose -f deploy/docker-compose.yml --env-file .env.production up -d
208+
```
209+
201210
This starts:
202211
- **server** -- The AgentBastion Rust binary (gateway on port 3000, console on port 3001 internal only)
203212
- **web** -- nginx serving the built React SPA (port 80)
@@ -278,33 +287,40 @@ Add labels to the `server` and `web` services in your compose override to config
278287

279288
A Helm chart is provided at `deploy/helm/agent-bastion/`.
280289

281-
### 4.1 Build and Push Docker Images
290+
### 4.1 Images
282291

283-
```bash
284-
# Server image
285-
docker build -f deploy/docker/Dockerfile.server -t your-registry/agent-bastion-server:0.1.0 .
286-
docker push your-registry/agent-bastion-server:0.1.0
292+
Pre-built images are published automatically to GitHub Container Registry on every push to `main`:
293+
294+
```
295+
ghcr.io/agentbastion/agent-bastion-server:latest
296+
ghcr.io/agentbastion/agent-bastion-server:<git-sha>
287297
288-
# Web UI image
289-
docker build -f deploy/docker/Dockerfile.web -t your-registry/agent-bastion-web:0.1.0 .
290-
docker push your-registry/agent-bastion-web:0.1.0
298+
ghcr.io/agentbastion/agent-bastion-web:latest
299+
ghcr.io/agentbastion/agent-bastion-web:<git-sha>
291300
```
292301

302+
No authentication is needed — the packages are public.
303+
293304
### 4.2 Install with Helm
294305

295306
```bash
296307
helm install agent-bastion deploy/helm/agent-bastion \
297-
--set image.server.repository=your-registry/agent-bastion-server \
298-
--set image.server.tag=0.1.0 \
299-
--set image.web.repository=your-registry/agent-bastion-web \
300-
--set image.web.tag=0.1.0 \
301308
--set secrets.jwtSecret=$(openssl rand -hex 32) \
302309
--set secrets.encryptionKey=$(openssl rand -hex 32) \
303310
--set secrets.databaseUrl="postgres://bastion:password@postgres:5432/agent_bastion" \
304311
--set secrets.redisUrl="redis://:password@redis:6379" \
305312
--set config.corsOrigins="https://console.internal.example.com"
306313
```
307314

315+
To deploy a specific image tag:
316+
317+
```bash
318+
helm install agent-bastion deploy/helm/agent-bastion \
319+
--set image.server.tag=<git-sha> \
320+
--set image.web.tag=<git-sha> \
321+
...
322+
```
323+
308324
### 4.3 Configure Ingress
309325

310326
The Helm chart supports dual-host Ingress. Enable and configure in `values.yaml` or via `--set`:

‎docs/zh-CN/deployment-guide.md‎

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,19 @@ openssl rand -base64 24
194194

195195
### 3.3 部署
196196

197+
从 GitHub Container Registry 拉取预构建镜像并启动所有服务:
198+
197199
```bash
200+
docker compose -f deploy/docker-compose.yml --env-file .env.production pull
198201
docker compose -f deploy/docker-compose.yml --env-file .env.production up -d
199202
```
200203

204+
如需固定特定版本而非 `latest`:
205+
206+
```bash
207+
IMAGE_TAG=<git-sha> docker compose -f deploy/docker-compose.yml --env-file .env.production up -d
208+
```
209+
201210
这将启动:
202211
- **server** —— AgentBastion Rust 二进制文件(网关端口 3000,控制台端口 3001 仅内部访问)
203212
- **web** —— nginx 提供构建好的 React SPA(端口 80)
@@ -278,33 +287,40 @@ server {
278287

279288
在 `deploy/helm/agent-bastion/` 提供了 Helm chart。
280289

281-
### 4.1 构建并推送 Docker 镜像
290+
### 4.1 镜像
282291

283-
```bash
284-
# Server image
285-
docker build -f deploy/docker/Dockerfile.server -t your-registry/agent-bastion-server:0.1.0 .
286-
docker push your-registry/agent-bastion-server:0.1.0
292+
预构建镜像在每次推送到 `main` 分支时自动发布到 GitHub Container Registry:
293+
294+
```
295+
ghcr.io/agentbastion/agent-bastion-server:latest
296+
ghcr.io/agentbastion/agent-bastion-server:<git-sha>
287297
288-
# Web UI image
289-
docker build -f deploy/docker/Dockerfile.web -t your-registry/agent-bastion-web:0.1.0 .
290-
docker push your-registry/agent-bastion-web:0.1.0
298+
ghcr.io/agentbastion/agent-bastion-web:latest
299+
ghcr.io/agentbastion/agent-bastion-web:<git-sha>
291300
```
292301

302+
镜像为公开可访问,无需认证即可拉取。
303+
293304
### 4.2 使用 Helm 安装
294305

295306
```bash
296307
helm install agent-bastion deploy/helm/agent-bastion \
297-
--set image.server.repository=your-registry/agent-bastion-server \
298-
--set image.server.tag=0.1.0 \
299-
--set image.web.repository=your-registry/agent-bastion-web \
300-
--set image.web.tag=0.1.0 \
301308
--set secrets.jwtSecret=$(openssl rand -hex 32) \
302309
--set secrets.encryptionKey=$(openssl rand -hex 32) \
303310
--set secrets.databaseUrl="postgres://bastion:password@postgres:5432/agent_bastion" \
304311
--set secrets.redisUrl="redis://:password@redis:6379" \
305312
--set config.corsOrigins="https://console.internal.example.com"
306313
```
307314

315+
如需部署特定版本:
316+
317+
```bash
318+
helm install agent-bastion deploy/helm/agent-bastion \
319+
--set image.server.tag=<git-sha> \
320+
--set image.web.tag=<git-sha> \
321+
...
322+
```
323+
308324
### 4.3 配置 Ingress
309325

310326
Helm chart 支持双主机 Ingress。在 `values.yaml` 中或通过 `--set` 启用和配置:

0 commit comments

Comments
 (0)