From e1c9f546321dfbc32beff093ad80a1d068550500 Mon Sep 17 00:00:00 2001 From: Junyan Qin <1010553892@qq.com> Date: Mon, 9 Oct 2023 00:56:52 +0000 Subject: [PATCH] doc: update docker command --- README.md | 3 ++- README_en.md | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d0a5b89..5ef8288 100644 --- a/README.md +++ b/README.md @@ -68,9 +68,10 @@ ### Docker (推荐) ```bash -docker run -d -p 3000:3000 --name free-one-api -v ./data:/app/data rockchin/free-one-api +docker run -d -p 3000:3000 --restart always --name free-one-api -v ~/free-one-api/data:/app/data rockchin/free-one-api ``` +此语句将启动 free-one-api 并指定 `~/free-one-api/data` 为容器的文件存储映射目录。 你可以在 `http://localhost:3000/` 打开管理页面。 ### 手动 diff --git a/README_en.md b/README_en.md index 6cc3026..de348c8 100644 --- a/README_en.md +++ b/README_en.md @@ -68,10 +68,11 @@ File a issue or pull request if you want to add more. ### Docker (Recommended) ```bash -docker run -d -p 3000:3000 --name free-one-api -v ./data:/app/data rockchin/free-one-api +docker run -d -p 3000:3000 --restart always --name free-one-api -v ~/free-one-api/data:/app/data rockchin/free-one-api ``` -then you can open the admin page at `http://localhost:3000/`. +This command will start free-one-api and specify `~/free-one-api/data` as the container's file storage mapping directory. +Then you can open the admin page at `http://localhost:3000/`. ### Manual