Skip to content

Commit 96a4c3c

Browse files
committed
📄Docs(README-CN.md):Installation and configuration
1 parent e7ed581 commit 96a4c3c

1 file changed

Lines changed: 58 additions & 0 deletions

File tree

README-CN.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,64 @@ Luminarium 是一个简单的图床,使用 Python 开发,基于 Flask 框架
1818
- 复制链接功能
1919
- 支持自定义配置
2020

21+
## 💽安装
22+
### 从 Docker 安装
23+
#### 稳定版
24+
```
25+
docker run -d -p {端口}:8080 airtouch/luminarium
26+
```
27+
28+
#### 开发版
29+
```
30+
docker run -d -p {端口}:8080 airtouch/luminarium-dev
31+
```
32+
33+
### 从源码安装
34+
35+
1. 克隆仓库:
36+
```
37+
git clone https://github.com/AirTouch666/Luminarium.git
38+
cd Luminarium
39+
```
40+
41+
2. 安装依赖:
42+
```
43+
pip install -r requirements.txt
44+
```
45+
46+
3. 运行应用:
47+
```
48+
python app.py
49+
```
50+
51+
4. 在浏览器中打开 `http://{IP}:{PORT}`
52+
53+
## 🔧配置
54+
应用程序使用 `config.json` 文件进行配置。首次运行时会自动创建此文件,包含以下默认设置:
55+
```json
56+
{
57+
"secret_key": "xxx",
58+
"port": 8080,//端口
59+
"background": "#f4f4f4",//背景
60+
"site_name": "Luminarium",//名称
61+
"site_icon": "",//图标
62+
"max_file_size": 10,//最大文件大小(MB)
63+
"allowed_extensions": ["png", "jpg", "jpeg", "gif", "webp"],//允许的文件类型
64+
"convert_to_webp": ["png", "jpg", "jpeg"],//自动转换为webp的文件类型
65+
"domain": ""//域名
66+
}
67+
```
68+
69+
您可以根据需要修改以下设置:
70+
- `port`: 应用程序运行的端口号(默认为 8080)
71+
- `background`: 应用程序的背景颜色或图片(默认为 #f4f4f4)
72+
- `site_name`: 应用程序的名称(默认为 Luminarium)
73+
- `site_icon`: 应用程序的图标(默认为空)
74+
- `max_file_size`: 上传文件的最大大小(默认为 10MB)
75+
- `allowed_extensions`: 允许上传的文件类型(默认为 ["png", "jpg", "jpeg", "gif", "webp"]
76+
- `convert_to_webp`: 自动转换为webp的文件类型(默认为 ["png", "jpg", "jpeg"]
77+
- `domain`: 域名(默认为空)
78+
2179
## ⌨️技术
2280

2381
- 后端: Python Flask

0 commit comments

Comments
 (0)