diff --git a/README.md b/README.md index 74cc037..7b0bc14 100644 --- a/README.md +++ b/README.md @@ -21,13 +21,28 @@ * 支持链接信息自动识别 * 支持API -## 快速开始 +## 安装 + +**常规安装:** 1. 需安装PHP环境,并确保支持SQLite3 2. 下载源码解压到站点根目录 -3. 将`config.simple.php`修改为`config.php`并填写自己的站点信息 +3. 将`config.simple.php`复制为`data/config.php`并填写自己的站点信息 5. 访问后台:`http://IP/index.php?c=login` +**Docker部署:** + +```bash +docker run -itd --name="onenav" -p 80:80 \ + -e USER='xiaoz' -e PASSWORD='xiaoz.me' \ + -v /data/onenav:/data/wwwroot/default/data \ + helloz/onenav +``` + +* `USER`:设置用户名,上述设置为`xiaoz` +* `PASSWORD`:设置密码,上述设置为`xiaoz.me` +* `/data/onenav`:本机挂载目录,用于持久存储Onenav数据 + > 更多说明,请参考帮助文档:https://www.yuque.com/helloz/onenav ## 联系我 diff --git a/index.php b/index.php index 8cac64f..3384187 100644 --- a/index.php +++ b/index.php @@ -12,7 +12,7 @@ $c = strip_tags($c); //$version = @file_get_contents("./functions/version.txt"); //载入配置文件 if( !file_exists('./data/config.php') ) { - exit('

配置文件不存在,请将config.simple.php复制一份并命名为config.php

'); + exit('

配置文件不存在,请将站点目录下的config.simple.php复制为data/config.php

'); } //检查数据库是否存在,不存在则复制数据库 if( !file_exists('./data/onenav.db3') ) { diff --git a/version.txt b/version.txt index 5e5fae1..751cd38 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -v0.9.8-20201224 \ No newline at end of file +v0.9.9-20210322 \ No newline at end of file