Skip to content

Commit 097bbbd

Browse files
committed
first commit
1 parent 4fe002f commit 097bbbd

9 files changed

+150
-0
lines changed

Dockerfile

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
FROM redis:6.0.5-alpine
2+
3+
# Add glibc package
4+
COPY ./glibc-2.31-r0.apk /lib/
5+
6+
# Add glibc key
7+
RUN wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub
8+
9+
# Install glibc
10+
RUN apk add /lib/glibc-2.31-r0.apk
11+
12+
# Set workdir
13+
WORKDIR /root/cloudreve
14+
15+
ADD cloudreve ./cloudreve
16+
ADD conf.ini ./conf.ini
17+
ADD cloudreve.db ./cloudreve.db
18+
ADD run.sh ./run.sh
19+
20+
RUN chmod +x ./cloudreve
21+
RUN chmod +x ./run.sh
22+
23+
CMD ./run.sh

README.md

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Cloudreve-Heroku with Redis
2+
Cloudreve with redis的Docker版本
3+
---
4+
一键部署在Heroku上:[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/useblue/Cloudreve-Heroku)
5+
---
6+
## 关于(目前)
7+
### 使用redis:6.0.5-alpine镜像制作,默认开启Redis缓存服务
8+
### 容器中的Redis版本为 6.0.5
9+
### 容器中的Cloudreve版本为 cloudreve_3.1.1_linux_amd64(#27bf8ca)
10+
---
11+
## 账户信息-请及时修改
12+
### 用户名:[email protected]
13+
### 密码:vUUH4MpL
14+
---
15+
#### 可能会随Cloudreve仓库进行大版本更新
16+
#### 生成日志:
17+
```
18+
___ _ _
19+
/ __\ | ___ _ _ __| |_ __ _____ _____
20+
/ / | |/ _ \| | | |/ _ | '__/ _ \ \ / / _ \
21+
/ /___| | (_) | |_| | (_| | | | __/\ V / __/
22+
\____/|_|\___/ \__,_|\__,_|_| \___| \_/ \___|
23+
24+
V3.1.1 Commit #27bf8ca Pro=false
25+
================================================
26+
27+
[Info] 2020-07-18 18:36:53 初始化数据库连接
28+
[Info] 2020-07-18 18:36:53 开始进行数据库初始化...
29+
[Info] 2020-07-18 18:36:53 初始管理员账号:[email protected]
30+
[Info] 2020-07-18 18:36:53 初始管理员密码:vUUH4MpL
31+
[Info] 2020-07-18 18:36:54 数据库初始化结束
32+
[Info] 2020-07-18 18:36:54 初始化任务队列,WorkerNum = 10
33+
[Info] 2020-07-18 18:36:54 初始化定时任务...
34+
[Info] 2020-07-18 18:36:54 当前运行模式:Master
35+
```

app.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"name": "Cloudreve-Heroku",
3+
"description": "Cloureve on Heroku with Redis",
4+
"repository": "https://github.com/useblue/Cloudreve-Heroku",
5+
"keywords": ["cloudreve", "redis", "netdisc", "share"]
6+
}

cloudreve

29.6 MB
Binary file not shown.

cloudreve.db

176 KB
Binary file not shown.

conf.ini

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
[System]
2+
; 运行模式
3+
Mode = master
4+
; 监听端口
5+
Listen = :8080
6+
; 是否开启 Debug
7+
Debug = false
8+
; Session 密钥, 一般在首次启动时自动生成
9+
SessionSecret = DwueqsOCChydmVIgTFtXNsqGNh3iUVOVyjdyBHPTppjG7FP1SiQYBOSZdOf35Pm7
10+
HashIDSalt = LzCgoB9pLdHYwsPQJ46AIDtLfkZ4KbtprcI8cxoKnwj58kFctbc9q3CmTUdXsCFP
11+
12+
; SSL 相关
13+
[SSL]
14+
; SSL 监听端口
15+
;Listen = :443
16+
; 证书路径
17+
;CertPath = C:\Users\i\Documents\fullchain.pem
18+
; 私钥路径
19+
;KeyPath = C:\Users\i\Documents\privkey.pem
20+
21+
; 数据库相关,如果你只想使用内置的 SQLite数据库,这一部分直接删去即可
22+
;[Database]
23+
; 数据库类型,目前支持 sqlite | mysql
24+
;Type = mysql
25+
; MySQL 端口
26+
;Port = 3306
27+
; 用户名
28+
;User = root
29+
; 密码
30+
;Password = root
31+
; 数据库地址
32+
;Host = 127.0.0.1
33+
; 数据库名称
34+
;Name = v3
35+
; 数据表前缀
36+
;TablePrefix = cd
37+
; SQLite 数据库文件路径
38+
;DBFile = cloudreve.db
39+
40+
; 从机模式下的配置
41+
;[Slave]
42+
; 通信密钥
43+
;Secret = 1234567891234567123456789123456712345678912345671234567891234567
44+
; 回调请求超时时间 (s)
45+
;CallbackTimeout = 20
46+
; 签名有效期
47+
;SignatureTTL = 60
48+
49+
; 跨域配置
50+
[CORS]
51+
AllowOrigins = *
52+
AllowMethods = OPTIONS,GET,POST
53+
AllowHeaders = *
54+
AllowCredentials = false
55+
56+
; Redis 相关
57+
[Redis]
58+
Server = 127.0.0.1:6379
59+
Password =
60+
DB = 0
61+
62+
; 从机模式缩略图
63+
[Thumbnail]
64+
MaxWidth = 400
65+
MaxHeight = 300
66+
FileSuffix = ._thumb

glibc-2.31-r0.apk

4.21 MB
Binary file not shown.

heroku.yml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
build:
2+
docker:
3+
web: Dockerfile

run.sh

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/sh
2+
cat <<-EOF > /root/cloudreve/conf.ini
3+
[System]
4+
; 运行模式
5+
Mode = master
6+
; 监听端口
7+
Listen = :${PORT}
8+
; 是否开启 Debug
9+
Debug = false
10+
SessionSecret = DwueqsOCChydmVIgTFtXNsqGNh3iUVOVyjdyBHPTppjG7FP1SiQYBOSZdOf35Pm7
11+
HashIDSalt = LzCgoB9pLdHYwsPQJ46AIDtLfkZ4KbtprcI8cxoKnwj58kFctbc9q3CmTUdXsCFP
12+
[Redis]
13+
Server = 127.0.0.1:6379
14+
Password =
15+
DB = 0
16+
EOF
17+
(redis-server &) && (./cloudreve -c ./conf.ini)

0 commit comments

Comments
 (0)