Skip to content

Commit 6406603

Browse files
committed
docs: update README and README.zh-CN with Docker run instructions
1 parent 3878464 commit 6406603

File tree

2 files changed

+32
-2
lines changed

2 files changed

+32
-2
lines changed

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,21 @@ A modern subscription management system that helps users easily manage and track
124124
docker compose build && docker compose up -d
125125
```
126126

127+
**C. Run with `docker run`**
128+
```bash
129+
docker run -d \
130+
--name subscription-manager \
131+
-e SESSION_SECRET=your_session_secret \
132+
-e ADMIN_USERNAME=admin \
133+
-e ADMIN_PASSWORD=your_admin_password \
134+
-e PORT=3001 \
135+
-v subscription-data:/app/data \
136+
-p 3001:3001 \
137+
ghcr.io/huhusmang/subscription-management:latest
138+
```
139+
- Add extra `-e` flags for optional settings (e.g. `-e TIANAPI_KEY=...`, `-e BASE_CURRENCY=USD`) as needed.
140+
- Prefer secrets management or an `.env` file in production; you can swap the `-e` flags for `--env-file /absolute/path/to/.env` if your environment supports it.
141+
127142
4. **Access the application**
128143
- Frontend: http://localhost:3001
129144
- The default port can be customized in the `.env` file (if you change it, make sure to update the `ports` setting accordingly)
@@ -248,4 +263,4 @@ npm run db:reset
248263

249264
## 📄 License
250265

251-
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details
266+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details

README.zh-CN.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,14 +116,29 @@
116116
- 如需指定具体 tag,可编辑 `docker-compose.yml``image:` 字段,或用如下命令手动拉取:
117117
```bash
118118
docker pull ghcr.io/huhusmang/subscription-management:<tag>
119-
```
119+
```
120120

121121
**B. 本地自定义构建镜像运行**
122122
-`docker-compose.yml` 注释掉 `image` 行,并取消 `build` 部分的注释:
123123
```bash
124124
docker compose build && docker compose up -d
125125
```
126126

127+
**C. 单条命令运行(适用于面板/命令执行器)**
128+
```bash
129+
docker run -d \
130+
--name subscription-manager \
131+
-e SESSION_SECRET=your_session_secret \
132+
-e ADMIN_USERNAME=admin \
133+
-e ADMIN_PASSWORD=your_admin_password \
134+
-e PORT=3001 \
135+
-v subscription-data:/app/data \
136+
-p 3001:3001 \
137+
ghcr.io/huhusmang/subscription-management:latest
138+
```
139+
- 如需更多可选项,可继续追加 `-e`(例如 `-e TIANAPI_KEY=...``-e BASE_CURRENCY=USD`)。
140+
- 也推荐使用更安全的密钥管理方式,改为 `--env-file /绝对路径/.env`
141+
127142
4. **访问应用界面**
128143
- 前端访问:http://localhost:3001
129144
- 默认端口可在 `.env` 文件中自定义(如需更换,确保 `ports` 配置同步修改)

0 commit comments

Comments
 (0)