Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/watish/breadnote
BreadNote是一款在线轻量笔记编辑平台,在浏览器访问即可使用不需要本地安装,方便快捷。
https://github.com/watish/breadnote
Last synced: 2 months ago
JSON representation
BreadNote是一款在线轻量笔记编辑平台,在浏览器访问即可使用不需要本地安装,方便快捷。
- Host: GitHub
- URL: https://github.com/watish/breadnote
- Owner: Watish
- Created: 2021-11-15T13:27:12.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2021-12-14T11:22:14.000Z (about 3 years ago)
- Last Synced: 2023-03-11T00:47:28.682Z (almost 2 years ago)
- Language: PHP
- Size: 10.7 MB
- Stars: 6
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# BreadNote V2.0
## 简介
BreadNote是一款在线轻量笔记编辑平台,在浏览器访问即可使用不需要本地安装,方便快捷。## 技术栈
`PHP` `MixPHP` `Swoole` `Javascript` `React` `Mysql`
#### 后端
由PHP编写,使用国人编写的轻量级高性能框架MixPHP并利用swoole协程技术,提供restful规范的接口
#### 前端
由React编写,使用Ant Design,简约大气## 预览图
![avatar](/storage/shortcut.png)
## 安装
> 需要先安装 [Nginx](http://nginx.org/en/download.html) 、[PHP 7.4+](https://www.php.net/)、[MySQL 5.6+](https://www.mysql.com/)
## 数据库配置
配置文件 `/conf/config.json`BreadNote不会自动创建数据库,所以我们要在使用前创建配置文件
```
{
"DATABASE_DSN":"mysql:host=数据库地址;port=端口;charset=utf8;dbname=数据库名",
"DATABASE_USERNAME":"数据库账号",
"DATABASE_PASSWORD":"数据库密码"
}
```#
## 快速开始由于笔记项目使用了swoole协程服务,我们不再支持php-fpm的启动方式
启动 Swoole 协程服务
```
composer run-script --timeout=0 swoole:start
```当然也可以直接下面这样启动,效果是一样的。
```
php bin/swoole.php start
```#
## 使用Docker部署
需要先部署一个MySQL容器,或者已安装好MySQL数据库
```
docker run --name breadnote -d -p 80:80 -v /path/to/config.json:/app/conf/config.json -v /tmp/garbage/:/app/cahce/ --restart=always watish/breadnote:v2
```### 配置文件映射
```
/path/to/config.json -> /app/conf/config.json
```
### *映射内存空间给BreadNote缓存目录
```
/tmp/BreadNote -> /app/cache
```
此方法可以有效防止笔记量增多后,或者高并发下的IO性能瓶颈,同时也能防止容器体积膨胀#
##### 由于BreadNote使用swoole协程技术,我们不再需要浪费时间配置入口文件