openlist / entrypoint.sh
defendex's picture
Create entrypoint.sh
a3316f0 verified
raw
history blame contribute delete
521 Bytes
#!/bin/sh
# η”Ÿζˆ config.json
cat > /opt/openlist/data/config.json <<EOF
{
"scheme": {
"address": "0.0.0.0",
"http_port": 7860
},
"database": {
"type": "${DB_TYPE:-sqlite3}",
"host": "${DB_HOST:-}",
"port": ${DB_PORT:-0},
"user": "${DB_USER:-}",
"password": "${DB_PASS:-}",
"name": "${DB_NAME:-}",
"ssl_mode": "${DB_SSL:-}",
"db_file": "data/data.db",
"table_prefix": "x_"
}
}
EOF
# θ΅‹δΊˆζƒι™
chmod -R 777 /opt/openlist/data
# 启动服劑
exec ./openlist server