defendex commited on
Commit
a3316f0
·
verified ·
1 Parent(s): 467f99e

Create entrypoint.sh

Browse files
Files changed (1) hide show
  1. entrypoint.sh +28 -0
entrypoint.sh ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/sh
2
+
3
+ # 生成 config.json
4
+ cat > /opt/openlist/data/config.json <<EOF
5
+ {
6
+ "scheme": {
7
+ "address": "0.0.0.0",
8
+ "http_port": 7860
9
+ },
10
+ "database": {
11
+ "type": "${DB_TYPE:-sqlite3}",
12
+ "host": "${DB_HOST:-}",
13
+ "port": ${DB_PORT:-0},
14
+ "user": "${DB_USER:-}",
15
+ "password": "${DB_PASS:-}",
16
+ "name": "${DB_NAME:-}",
17
+ "ssl_mode": "${DB_SSL:-}",
18
+ "db_file": "data/data.db",
19
+ "table_prefix": "x_"
20
+ }
21
+ }
22
+ EOF
23
+
24
+ # 赋予权限
25
+ chmod -R 777 /opt/openlist/data
26
+
27
+ # 启动服务
28
+ exec ./openlist server