mirror of
https://github.com/RuoJi6/ARTEX.git
synced 2026-10-27 17:03:49 +08:00
feat(release): publish standalone repository and Docker Hub images
This commit is contained in:
1 parent
714b00cccb
commit
dfef372b64
8 files changed
+149
-42
No files matched your search
+5
-1
@@ -1,4 +1,8 @@
|
|||||||
.git
|
.git
|
||||||
|
.env
|
||||||
|
.env.*
|
||||||
|
config.json
|
||||||
|
jwt.key
|
||||||
**/node_modules
|
**/node_modules
|
||||||
web/.next
|
web/.next
|
||||||
web/out
|
web/out
|
||||||
@@ -13,4 +17,4 @@ bench/__pycache__
|
|||||||
bench/.env
|
bench/.env
|
||||||
bench/scheduler.py
|
bench/scheduler.py
|
||||||
bench/entrypoint_v2.sh
|
bench/entrypoint_v2.sh
|
||||||
bench/seed_v2.sh
|
bench/seed_v2.sh
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
# Docker 部署配置(复制为 .env)
|
# Docker 部署配置(复制为 .env)
|
||||||
|
# 本仓库发布的 Docker Hub 镜像地址;参见 README 的部署说明。
|
||||||
|
ARTEX_IMAGE=ruoji6/artex
|
||||||
ARTEX_TAG=latest
|
ARTEX_TAG=latest
|
||||||
POSTGRES_USER=artex
|
POSTGRES_USER=artex
|
||||||
POSTGRES_PASSWORD=change-me-please
|
POSTGRES_PASSWORD=change-me-please
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
tag:
|
tag:
|
||||||
description: "已存在的正式版本标签,例如 v0.3.16"
|
description: "已存在的正式版本标签,例如 v0.3.17"
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
push:
|
push:
|
||||||
@@ -27,9 +27,14 @@ jobs:
|
|||||||
id: version
|
id: version
|
||||||
env:
|
env:
|
||||||
RELEASE_TAG: ${{ inputs.tag || github.ref_name }}
|
RELEASE_TAG: ${{ inputs.tag || github.ref_name }}
|
||||||
|
ARTEX_DOCKER_IMAGE: ${{ vars.ARTEX_DOCKER_IMAGE }}
|
||||||
run: |
|
run: |
|
||||||
if [[ ! "$RELEASE_TAG" =~ ^v(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$ ]]; then
|
if [[ ! "$RELEASE_TAG" =~ ^v(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$ ]]; then
|
||||||
echo "正式版本必须是 v主版本.次版本.修订号,例如 v0.3.16" >&2
|
echo "正式版本必须是 v主版本.次版本.修订号,例如 v0.3.17" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [[ ! "$ARTEX_DOCKER_IMAGE" =~ ^[a-z0-9][a-z0-9_-]*/[a-z0-9]+([._-][a-z0-9]+)*$ ]]; then
|
||||||
|
echo "请先配置 Actions 变量 ARTEX_DOCKER_IMAGE,格式为 Docker Hub 用户名/镜像名" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "tag=$RELEASE_TAG" >> "$GITHUB_OUTPUT"
|
echo "tag=$RELEASE_TAG" >> "$GITHUB_OUTPUT"
|
||||||
@@ -116,7 +121,7 @@ jobs:
|
|||||||
|
|
||||||
# ③ 汇总所有 zip → 创建 GitHub Release
|
# ③ 汇总所有 zip → 创建 GitHub Release
|
||||||
release:
|
release:
|
||||||
needs: [prepare, binaries]
|
needs: [prepare, binaries, docker-publish]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
@@ -160,47 +165,102 @@ jobs:
|
|||||||
dist/*.zip
|
dist/*.zip
|
||||||
dist/SHA256SUMS
|
dist/SHA256SUMS
|
||||||
generate_release_notes: true
|
generate_release_notes: true
|
||||||
|
body: |
|
||||||
|
Docker Hub 镜像:`${{ vars.ARTEX_DOCKER_IMAGE }}:${{ needs.prepare.outputs.tag }}`,同时提供 `latest`。
|
||||||
|
支持 Linux AMD64 / ARM64,Docker 会自动选择宿主机架构。
|
||||||
|
程序包提供 Linux、macOS 的 AMD64 / ARM64 及 Windows AMD64,并附 SHA256SUMS。
|
||||||
|
部署和在线更新说明见本仓库 README。
|
||||||
- name: Publish complete release
|
- name: Publish complete release
|
||||||
run: gh release edit "$RELEASE_TAG" --draft=false --latest
|
run: gh release edit "$RELEASE_TAG" --draft=false --latest
|
||||||
|
|
||||||
# ④ 多架构镜像 → 推 Docker Hub(复用 binaries 编好的 Linux 二进制,
|
# ④ 在原生 AMD64 / ARM64 runner 上构建和测试,再推送架构镜像。
|
||||||
# 镜像里只装工具 + 放二进制;arm64 仅需模拟 apt 层,构建快很多)
|
|
||||||
docker:
|
docker:
|
||||||
# 页面更新只需要 Release;镜像发布按需启用,不依赖原作者的账号。
|
|
||||||
if: vars.ARTEX_DOCKER_IMAGE != ''
|
|
||||||
needs: [prepare, binaries]
|
needs: [prepare, binaries]
|
||||||
runs-on: ubuntu-latest
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- { arch: amd64, runner: ubuntu-24.04 }
|
||||||
|
- { arch: arm64, runner: ubuntu-24.04-arm }
|
||||||
|
runs-on: ${{ matrix.runner }}
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres:16-alpine
|
||||||
|
env:
|
||||||
|
POSTGRES_USER: artex
|
||||||
|
POSTGRES_PASSWORD: artex-ci-test
|
||||||
|
POSTGRES_DB: artex
|
||||||
|
ports:
|
||||||
|
- 5432:5432
|
||||||
|
options: >-
|
||||||
|
--health-cmd "pg_isready -U artex -d artex"
|
||||||
|
--health-interval 5s --health-timeout 3s --health-retries 10
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4 # 取 Dockerfile 与 skills/
|
- uses: actions/checkout@v4 # 取 Dockerfile 与 skills/
|
||||||
with:
|
with:
|
||||||
ref: ${{ needs.prepare.outputs.commit }}
|
ref: ${{ needs.prepare.outputs.commit }}
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: bin-linux-amd64
|
name: bin-linux-${{ matrix.arch }}
|
||||||
path: dist/amd64
|
path: dist/${{ matrix.arch }}
|
||||||
- uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
name: bin-linux-arm64
|
|
||||||
path: dist/arm64
|
|
||||||
- uses: docker/setup-qemu-action@v3
|
|
||||||
- uses: docker/setup-buildx-action@v3
|
- uses: docker/setup-buildx-action@v3
|
||||||
- uses: docker/login-action@v3
|
- uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
- uses: docker/metadata-action@v5
|
- name: Build image for native smoke test
|
||||||
id: meta
|
uses: docker/build-push-action@v6
|
||||||
with:
|
|
||||||
images: ${{ vars.ARTEX_DOCKER_IMAGE }}
|
|
||||||
tags: |
|
|
||||||
type=raw,value=${{ needs.prepare.outputs.tag }}
|
|
||||||
type=raw,value=latest
|
|
||||||
- uses: docker/build-push-action@v6
|
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/${{ matrix.arch }}
|
||||||
|
load: true
|
||||||
|
tags: artex:smoke
|
||||||
|
cache-from: type=gha,scope=docker-${{ matrix.arch }}
|
||||||
|
cache-to: type=gha,mode=max,scope=docker-${{ matrix.arch }}
|
||||||
|
- name: Test application startup and embedded frontend
|
||||||
|
env:
|
||||||
|
RELEASE_TAG: ${{ needs.prepare.outputs.tag }}
|
||||||
|
run: |
|
||||||
|
docker run --rm --entrypoint /app/artex artex:smoke -h
|
||||||
|
docker run -d --name artex-smoke --network host \
|
||||||
|
-e ARTEX_PG_DSN='postgres://artex:[email protected]:5432/artex?sslmode=disable' artex:smoke
|
||||||
|
trap 'docker logs artex-smoke; docker rm -f artex-smoke' EXIT
|
||||||
|
curl --fail --retry 30 --retry-connrefused --retry-delay 2 --max-time 3 \
|
||||||
|
http://127.0.0.1:8787/api/health > /tmp/artex-health.json
|
||||||
|
jq -e --arg version "${RELEASE_TAG#v}" '.ok == true and .version == $version' /tmp/artex-health.json
|
||||||
|
curl --fail http://127.0.0.1:8787/ > /tmp/artex-index.html
|
||||||
|
grep -qi '<!doctype html' /tmp/artex-index.html
|
||||||
|
- name: Push tested architecture image
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
platforms: linux/${{ matrix.arch }}
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ vars.ARTEX_DOCKER_IMAGE }}:${{ needs.prepare.outputs.tag }}-${{ matrix.arch }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: |
|
||||||
cache-from: type=gha
|
org.opencontainers.image.source=https://github.com/${{ github.repository }}
|
||||||
cache-to: type=gha,mode=max
|
org.opencontainers.image.version=${{ needs.prepare.outputs.tag }}
|
||||||
|
org.opencontainers.image.revision=${{ needs.prepare.outputs.commit }}
|
||||||
|
org.opencontainers.image.licenses=AGPL-3.0
|
||||||
|
cache-from: type=gha,scope=docker-${{ matrix.arch }}
|
||||||
|
|
||||||
|
# ⑤ 只有两种架构都通过启动验证,才发布正式版本和 latest 镜像。
|
||||||
|
docker-publish:
|
||||||
|
needs: [prepare, docker]
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
steps:
|
||||||
|
- uses: docker/setup-buildx-action@v3
|
||||||
|
- uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
- name: Publish multi-platform image
|
||||||
|
env:
|
||||||
|
IMAGE: ${{ vars.ARTEX_DOCKER_IMAGE }}
|
||||||
|
RELEASE_TAG: ${{ needs.prepare.outputs.tag }}
|
||||||
|
run: |
|
||||||
|
docker buildx imagetools create \
|
||||||
|
--tag "$IMAGE:$RELEASE_TAG" --tag "$IMAGE:latest" \
|
||||||
|
"$IMAGE:$RELEASE_TAG-amd64" "$IMAGE:$RELEASE_TAG-arm64"
|
||||||
|
docker buildx imagetools inspect "$IMAGE:$RELEASE_TAG" --raw > /tmp/artex-manifest.json
|
||||||
|
jq -e '[.manifests[].platform | select(.os == "linux") | .architecture] | index("amd64") != null and index("arm64") != null' /tmp/artex-manifest.json
|
||||||
@@ -4,6 +4,20 @@
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [0.3.17] - 2026-10-09
|
||||||
|
|
||||||
|
### 部署与发布
|
||||||
|
|
||||||
|
- 迁移至独立的 `RuoJi6/ARTEX` 仓库,保留原提交历史、分支、标签及历史发布包。
|
||||||
|
- GitHub Actions 构建五个平台的程序包,并在原生 AMD64、ARM64 runner 上构建和测试 Docker Hub 镜像。
|
||||||
|
- 镜像启动、数据库连接及内嵌前端验证通过后,发布版本镜像、`latest` 与完整 GitHub Release。
|
||||||
|
- Compose、环境变量示例与部署说明使用本仓库的镜像;补充已有部署保留数据的迁移方式。
|
||||||
|
- 页面在线更新继续从 `RuoJi6/ARTEX` 的正式 Release 下载程序。
|
||||||
|
|
||||||
|
## [0.3.16] - 2026-10-09
|
||||||
|
|
||||||
|
- 页面在线更新源改为 `RuoJi6/ARTEX`,支持通过 GitHub Actions 编译并发布五个平台程序包和 SHA256 校验文件。
|
||||||
|
|
||||||
## [0.3.15] - 2026-10-07
|
## [0.3.15] - 2026-10-07
|
||||||
|
|
||||||
### 拦截
|
### 拦截
|
||||||
|
|||||||
+2
-2
@@ -13,11 +13,11 @@
|
|||||||
FROM python:3.12-slim-bookworm
|
FROM python:3.12-slim-bookworm
|
||||||
ARG TARGETARCH
|
ARG TARGETARCH
|
||||||
# 常用工具:ripgrep / curl / vim,加一批 recon 常备件(按需增删)。
|
# 常用工具:ripgrep / curl / vim,加一批 recon 常备件(按需增删)。
|
||||||
# Node 从 NodeSource 装 20.x:bookworm 自带的 apt nodejs 是 18,Playwright 要求 >=20。
|
# Node 从 NodeSource 装 22.x,与前端构建使用的主版本一致。
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
ca-certificates ripgrep curl wget vim git jq unzip \
|
ca-certificates ripgrep curl wget vim git jq unzip \
|
||||||
dnsutils iputils-ping netcat-openbsd inetutils-telnet whois nmap \
|
dnsutils iputils-ping netcat-openbsd inetutils-telnet whois nmap \
|
||||||
&& curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
|
&& curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
|
||||||
&& apt-get install -y --no-install-recommends nodejs \
|
&& apt-get install -y --no-install-recommends nodejs \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
# 预装 Playwright MCP 与 CLI(全局),运行时不再 npx 联网下载。
|
# 预装 Playwright MCP 与 CLI(全局),运行时不再 npx 联网下载。
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ AI 自主渗透测试系统(Go 后端 + Next.js 前端)
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
本仓库为独立维护的 [RuoJi6/ARTEX](https://github.com/RuoJi6/ARTEX),保留 ARTEX 的原始提交历史与 AGPL-3.0 许可证。程序发布包从本仓库 Releases 下载,Docker 镜像 [ruoji6/artex](https://hub.docker.com/r/ruoji6/artex) 由本仓库 GitHub Actions 构建并发布。
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 截图预览
|
## 截图预览
|
||||||
@@ -69,7 +71,7 @@ AI 自主渗透测试系统(Go 后端 + Next.js 前端)
|
|||||||
### 方式一:一键安装脚本(推荐)
|
### 方式一:一键安装脚本(推荐)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/Autumn-27/ARTEX.git
|
git clone https://github.com/RuoJi6/ARTEX.git
|
||||||
cd ARTEX
|
cd ARTEX
|
||||||
./install.sh
|
./install.sh
|
||||||
```
|
```
|
||||||
@@ -84,15 +86,17 @@ cd ARTEX
|
|||||||
### 方式二:Docker Compose(手动)
|
### 方式二:Docker Compose(手动)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/Autumn-27/ARTEX.git
|
git clone https://github.com/RuoJi6/ARTEX.git
|
||||||
cd ARTEX
|
cd ARTEX
|
||||||
cp .env.example .env # 填 POSTGRES_PASSWORD、可选 ANTHROPIC_API_KEY
|
cp .env.example .env # 填 POSTGRES_PASSWORD、可选 ANTHROPIC_API_KEY
|
||||||
docker compose up -d # 拉取 autumn27/artex 镜像 + postgres
|
docker compose up -d # 拉取 ruoji6/artex 镜像 + postgres
|
||||||
# → http://localhost:8787
|
# → http://localhost:8787
|
||||||
```
|
```
|
||||||
|
|
||||||
镜像已含常用工具(ripgrep/curl/vim/npm/nmap…);`./skills` 与 `./data` 以绑定挂载持久化。
|
镜像已含常用工具(ripgrep/curl/vim/npm/nmap…);`./skills` 与 `./data` 以绑定挂载持久化。
|
||||||
|
|
||||||
|
`.env` 中默认 `ARTEX_IMAGE=ruoji6/artex`,`ARTEX_TAG=latest` 使用最新镜像,也可固定为 `v0.3.17`(完整镜像地址 `ruoji6/artex:v0.3.17`)。镜像支持 `linux/amd64` 和 `linux/arm64`,Docker 会自动选择与宿主机匹配的架构,ARM64 Kali 无需自行编译。初次部署请修改 `POSTGRES_PASSWORD`;运行服务无需配置 Docker Hub 发布 Token。
|
||||||
|
|
||||||
远程 MCP 可在系统设置中选择 `http`(Streamable HTTP)或 `sse`(旧版 SSE)。
|
远程 MCP 可在系统设置中选择 `http`(Streamable HTTP)或 `sse`(旧版 SSE)。
|
||||||
旧版 SSE 服务通常使用 `GET /sse` 建立事件流,再通过服务返回的
|
旧版 SSE 服务通常使用 `GET /sse` 建立事件流,再通过服务返回的
|
||||||
`/message?sessionId=...` 接收 JSON-RPC 请求;配置时将 URL 填为 `/sse`,请求头按
|
`/message?sessionId=...` 接收 JSON-RPC 请求;配置时将 URL 填为 `/sse`,请求头按
|
||||||
@@ -161,17 +165,39 @@ ARTEX_TARGETS=linux/amd64,windows/amd64 ./build.sh --release
|
|||||||
|
|
||||||
### 维护者:通过 GitHub Actions 发布在线更新
|
### 维护者:通过 GitHub Actions 发布在线更新
|
||||||
|
|
||||||
发布工作流为 `.github/workflows/release.yml`。推送正式标签会触发构建,也可在 Actions → release → Run workflow 中输入已存在的标签重新执行失败的发布。标签必须是 `v主版本.次版本.修订号`,例如下例的 `v0.3.16`;后续版本必须高于用户正在运行的版本。
|
发布工作流为 `.github/workflows/release.yml`。推送正式标签会触发构建,也可在 Actions → release → Run workflow 中输入已存在的标签重新执行失败的发布。标签必须是 `v主版本.次版本.修订号`,例如下例的 `v0.3.17`;后续版本必须高于用户正在运行的版本。
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git push origin main
|
git push origin main
|
||||||
git tag v0.3.16
|
git tag v0.3.17
|
||||||
git push origin v0.3.16
|
git push origin v0.3.17
|
||||||
```
|
```
|
||||||
|
|
||||||
工作流固定标签对应的提交,用 Node.js 22 导出前端,按照 `go.mod` 指定的 Go 版本编译内嵌前端的五个平台程序,并生成 ZIP 与 `SHA256SUMS`。全部发布包准备好后先上传到草稿 Release,上传成功才公开为最新正式版,避免页面检查到尚未上传完整的版本。已公开的同版本不允许覆盖,应发布新标签。
|
工作流固定标签对应的提交,用 Node.js 22 导出前端,按照 `go.mod` 指定的 Go 版本编译内嵌前端的五个平台程序,并生成 ZIP 与 `SHA256SUMS`。AMD64 和 ARM64 镜像分别在 GitHub 原生 runner 上构建,连接临时 PostgreSQL 验证程序启动、版本和内嵌前端;两种架构都通过后发布多架构镜像的版本标签与 `latest`。镜像发布成功后上传完整 ZIP 和校验文件,最后公开 Release。已公开的同版本不允许覆盖,应发布新标签。
|
||||||
|
|
||||||
页面在线更新所需的发布只使用仓库自带 `GITHUB_TOKEN`,无需 Docker Hub 凭据。Docker 镜像任务默认跳过;如需单独发布自己的镜像,设置仓库 Actions 变量 `ARTEX_DOCKER_IMAGE`(自己的 Docker Hub 镜像名)及 Secrets `DOCKERHUB_USERNAME`、`DOCKERHUB_TOKEN`。现有 Compose 文件仍指向原镜像,使用自有镜像时应自行修改镜像地址。
|
维护者需在本仓库 Settings → Secrets and variables → Actions 中配置变量 `ARTEX_DOCKER_IMAGE`(Docker Hub 用户名/镜像名)和 Secrets `DOCKERHUB_USERNAME`、`DOCKERHUB_TOKEN`(有镜像推送权限)。程序包通过 GitHub 自带 `GITHUB_TOKEN` 上传,镜像通过上述凭据推送到 Docker Hub。凭据只供工作流登录使用,不写入源码或镜像。镜像地址同时记录在 `.env.example` 和 Compose 默认值中。
|
||||||
|
|
||||||
|
### 已有 Docker 部署迁移到本仓库镜像
|
||||||
|
|
||||||
|
在原部署目录中备份 `.env`、Compose 文件、`data/` 和 PostgreSQL 数据,保留原数据库卷和 skills 挂载。将 `.env` 的 `ARTEX_IMAGE` 设置为本仓库镜像地址、`ARTEX_TAG` 设置为目标版本;如果旧 Compose 仍写死原作者的镜像,可创建下列覆盖文件(已有覆盖文件时应合并 image 配置):
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# docker-compose.override.yml
|
||||||
|
services:
|
||||||
|
artex:
|
||||||
|
image: ${ARTEX_IMAGE}:${ARTEX_TAG:-latest}
|
||||||
|
```
|
||||||
|
|
||||||
|
然后只更新应用容器:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker compose pull artex
|
||||||
|
docker compose up -d --no-deps artex
|
||||||
|
curl --fail http://127.0.0.1:8787/api/health
|
||||||
|
docker compose logs --tail=50 artex
|
||||||
|
```
|
||||||
|
|
||||||
|
继续使用原部署目录和 Compose 项目名称,确保 `./data`、`./skills` 和 PostgreSQL 数据卷仍指向原数据。迁移后程序从 `RuoJi6/ARTEX` 检查在线更新;后续可用页面更新程序或上述命令更新整个镜像。
|
||||||
|
|
||||||
首次迁移已有 Docker 部署时,将已校验的新 ARM64 ZIP 解压到宿主机,备份原程序,然后只替换已有容器中的 `/app/artex`。例如现有容器名为 `artex-artex-1`:
|
首次迁移已有 Docker 部署时,将已校验的新 ARM64 ZIP 解压到宿主机,备份原程序,然后只替换已有容器中的 `/app/artex`。例如现有容器名为 `artex-artex-1`:
|
||||||
|
|
||||||
@@ -205,7 +231,7 @@ cd ARTEX
|
|||||||
```bash
|
```bash
|
||||||
cd ARTEX
|
cd ARTEX
|
||||||
git pull # 更新 compose / 脚本(可选)
|
git pull # 更新 compose / 脚本(可选)
|
||||||
# 指定版本:在 .env 设 ARTEX_TAG=v0.2.0;不设则用 latest
|
# 指定版本:在 .env 设 ARTEX_TAG=v0.3.17;不设则用 latest
|
||||||
docker compose pull artex
|
docker compose pull artex
|
||||||
docker compose up -d artex # 换新镜像重启 → 自动迁移 schema
|
docker compose up -d artex # 换新镜像重启 → 自动迁移 schema
|
||||||
docker image prune -f # 清理旧镜像(可选)
|
docker image prune -f # 清理旧镜像(可选)
|
||||||
|
|||||||
+1
-1
@@ -15,7 +15,7 @@ services:
|
|||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
artex:
|
artex:
|
||||||
image: autumn27/artex:${ARTEX_TAG:-latest}
|
image: ${ARTEX_IMAGE:-ruoji6/artex}:${ARTEX_TAG:-latest}
|
||||||
depends_on:
|
depends_on:
|
||||||
postgres:
|
postgres:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
|||||||
+2
-1
@@ -33,6 +33,7 @@ ensure_docker(){
|
|||||||
# ── ① 全部 Docker ───────────────────────────────
|
# ── ① 全部 Docker ───────────────────────────────
|
||||||
install_docker(){
|
install_docker(){
|
||||||
ensure_docker
|
ensure_docker
|
||||||
|
umask 077
|
||||||
if [ ! -f .env ]; then
|
if [ ! -f .env ]; then
|
||||||
cp .env.example .env 2>/dev/null || true
|
cp .env.example .env 2>/dev/null || true
|
||||||
local pw key
|
local pw key
|
||||||
@@ -46,7 +47,7 @@ install_docker(){
|
|||||||
info "沿用已存在的 .env"
|
info "沿用已存在的 .env"
|
||||||
fi
|
fi
|
||||||
info "拉取镜像并启动…"
|
info "拉取镜像并启动…"
|
||||||
docker compose pull || true
|
docker compose pull
|
||||||
docker compose up -d
|
docker compose up -d
|
||||||
ok "启动完成 → http://localhost:8787"
|
ok "启动完成 → http://localhost:8787"
|
||||||
info "查看日志:docker compose logs -f artex"
|
info "查看日志:docker compose logs -f artex"
|
||||||
|
|||||||
Reference in new issue
Block a user