From 48a5f1c39e8908afbb46f1ff88c7e1d63b58cdb0 Mon Sep 17 00:00:00 2001 From: MoeCaa <54182920+MoeclubM@users.noreply.github.com> Date: Thu, 2 Apr 2026 13:19:23 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=AE=8C=E5=96=84Docker=E9=83=A8=E6=95=99?= =?UTF-8?q?=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 增加配置文件的复制,由于docker-compose.yml映射了文件但是本地还不存在config.json,启动之后会导致app/config.json被映射成文件夹导致运行报错 --- README.MD | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.MD b/README.MD index d22025a..1c20ee6 100644 --- a/README.MD +++ b/README.MD @@ -166,8 +166,9 @@ go run ./cmd/ds2api ### 方式二:Docker 运行 ```bash -# 1. 准备环境变量文件 +# 1. 准备环境变量和配置文件 cp .env.example .env +cp config.example.json config.json # 2. 编辑 .env(至少设置 DS2API_ADMIN_KEY) # DS2API_ADMIN_KEY=请替换为强密码 From a87ec3fd68d4edb37c947050492dec3a954599bb Mon Sep 17 00:00:00 2001 From: MoeclubM Date: Thu, 2 Apr 2026 13:34:57 +0800 Subject: [PATCH 2/2] docs: sync docker config setup steps --- README.en.md | 3 ++- docs/DEPLOY.en.md | 3 ++- docs/DEPLOY.md | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.en.md b/README.en.md index cf2e376..34bc615 100644 --- a/README.en.md +++ b/README.en.md @@ -166,8 +166,9 @@ Default URL: `http://localhost:5001` ### Option 2: Docker ```bash -# 1. Prepare env file +# 1. Prepare env file and config file cp .env.example .env +cp config.example.json config.json # 2. Edit .env (at least set DS2API_ADMIN_KEY) # DS2API_ADMIN_KEY=replace-with-a-strong-secret diff --git a/docs/DEPLOY.en.md b/docs/DEPLOY.en.md index 917bd71..855af36 100644 --- a/docs/DEPLOY.en.md +++ b/docs/DEPLOY.en.md @@ -111,8 +111,9 @@ go build -o ds2api ./cmd/ds2api ### 2.1 Basic Steps ```bash -# Copy env template +# Copy env template and config file cp .env.example .env +cp config.example.json config.json # Edit .env and set at least: # DS2API_ADMIN_KEY=your-admin-key diff --git a/docs/DEPLOY.md b/docs/DEPLOY.md index 61b50f0..3082da7 100644 --- a/docs/DEPLOY.md +++ b/docs/DEPLOY.md @@ -111,8 +111,9 @@ go build -o ds2api ./cmd/ds2api ### 2.1 基本步骤 ```bash -# 复制环境变量模板 +# 复制环境变量模板和配置文件 cp .env.example .env +cp config.example.json config.json # 编辑 .env(请改成你的强密码),至少设置: # DS2API_ADMIN_KEY=your-admin-key