Merge pull request #25 from PGYER/dev/master

add docs on update
This commit is contained in:
Carney Wu
2022-02-07 10:52:32 +08:00
committed by GitHub
6 changed files with 93 additions and 2 deletions

View File

@@ -56,6 +56,7 @@
- [功能特性](#功能特性)
- [如何安装](#如何安装)
- [如何更新](#如何更新)
- [使用说明](#使用说明)
- [问题反馈](#问题反馈)
- [贡献代码](#贡献代码)
@@ -78,7 +79,7 @@
- ⚡️ **性能高效:** 速度极快对服务器资源要求极低1核CPU/1G内存即可运行
- ♾️ **无限仓库:** 没有任何仓库数量、使用数量的限制
- ⌨️ **代码对比:** 支持提交代码的不同版本支持高亮显示对比
- 🛤️ **分支管理:** 完整支持 Git 原生分支Tag帮助更清晰的管理代码
- 🛤️ **分支管理:** 完整支持 Git 原生分支Tag帮助更清晰的管理代码
- 🙋‍♂️ **合并请求Merge Request:** 支持多人协作,让代码版本控制更顺畅
- 🙅🏻‍♀️ **分支保护:** 分支保护功能让代码提交安全可控,代码 Review 更容易清晰
- 👥 **多人协作:** 支持多人团队协作,并可以设置每个成员的角色和权限
@@ -92,6 +93,10 @@
- **(推荐)** 最简单的安装方式是使用 `Docker`,只需要一行命令即可完成,具体可见: [Docker 镜像安装](doc/zh-cn/installation/install_via_docker.md)
- 如果出于学习、研究或定制化需求,也可以手动方式安装,具体可见:[从头开始安装](doc/zh-cn/installation/install_from_scratch.md)
### **如何更新**
`CodeFever` 可以进行保留原有数据更新,按照如下文档即可完成更新操作。具体可见: [更新 CodeFever](doc/zh-cn/installation/update.md)
### **使用说明**
- [仓库](doc/zh-cn/repo)

View File

@@ -1,3 +1,5 @@
[从零开始安装](install_from_scratch.md)
[Docker 镜像安装](install_via_docker.md)
[更新 CodeFever](update.md)

View File

@@ -0,0 +1,20 @@
# 更新
`CodeFever Community 版本` 会根据 `CodeFever` 功能更新以及社区反馈不定期进行版本更新,对于 [从零开始安装](install_from_scratch.md) 和 [Docker 镜像安装](install_via_docker.md) 两种方式安装的用户来说,更新方式可能有所差异。
## 保留历史数据更新
> - 如果您使用 `Docker 方式安装`, 请在执行下面步骤前需要先执行 `docker container exec -it codefever /bin/bash` 登录到 `codefever` 容器的 `shell` 上
> - 执行此更新步骤后, 配置文件 `config.yaml` 和 `env.yaml` 中的内容可能会被重置。 如果你对这两个文件做过修改,更新前请备份您的修改。
按照以下步骤进行 `CodeFever` 的更新
- 运行 `cd /data/www/codefever-community` 进入指定目录
- 运行 `git pull origin master`
- 运行 `cd misc` 进入配置脚本目录
- 运行 `sh ./update.sh` 执行更新操作
## 不保留历史数据更新
直接选择你喜欢的安装方式,参照 [从零开始安装](install_from_scratch.md) 和 [Docker 镜像安装](install_via_docker.md) 文档重新安装即可。

View File

@@ -27,6 +27,10 @@
参照: [Docker 镜像安装](../installation/install_via_docker.md)
### 更新
`CodeFever` 可以进行保留原有数据更新,按照如下文档即可完成更新操作。具体可见:[更新 CodeFever](../installation/update.md)
### 使用
[仓库](../reposiotry)

View File

@@ -18,7 +18,7 @@ echo 'ssh for user git set!'
cp nginx.conf-template /usr/local/nginx/conf/nginx.conf
echo 'nginx configuration file cpoied!'
echo 'nginx configuration file copied!'
cp php.ini-template /usr/local/php/etc/php.ini
cp php-fpm.conf-template /usr/local/php/etc/php-fpm.conf

60
misc/update.sh Normal file
View File

@@ -0,0 +1,60 @@
#!/bin/bash
if [ $UID -ne 0 ]; then
echo 'run as root please'
exit 1
fi
echo 'start update...'
service codefever stop
service php-fpm stop
service nginx stop
echo 'service stopped!'
cp nginx.conf-template /usr/local/nginx/conf/nginx.conf
echo 'nginx configuration file copied!'
cp php.ini-template /usr/local/php/etc/php.ini
cp php-fpm.conf-template /usr/local/php/etc/php-fpm.conf
cp www.conf-template /usr/local/php/etc/php-fpm.d/www.conf
echo 'php (php.ini & php-fpm) configuration file cpoied!'
cp nginx-service-template /etc/init.d/nginx
cp php-fpm-service-template /etc/init.d/php-fpm
cp codefever-service-template /etc/init.d/codefever
echo 'services updated!'
cp ../config.template.yaml ../config.yaml
cp ../env.template.yaml ../env.yaml
chmod 0777 ../config.yaml ../env.yaml
echo 'env files overwrote!'
echo 'Loading composer libraries: (Just Press Enter Key!)'
cd ../application/libraries/composerlib/
/usr/local/php/bin/php ./composer.phar install
cd -
echo 'Composer libraries loaded!'
service codefever start
service php-fpm start
service nginx start
echo 'services started!'
echo 'Done!'
echo -e "\n\n\n"
echo '=== IMPORTANT NOTICE ==='
echo '1. You shuold edit file </data/www/codefever-community/env.yaml: mysql/*> to finish mysql settings.'
echo '2. You shuold edit file </data/www/codefever-community/env.yaml: session/*> to finish cookie settings.'
echo '3. You shuold edit file </data/www/codefever-community/env.yaml: gateway/token> to finish git gateway security settings.'
echo 'have fun!'