2020-07-05 10:25:57 +02:00
|
|
|
#!/bin/bash
|
2020-07-05 05:37:57 +02:00
|
|
|
set -e
|
2020-07-05 10:25:57 +02:00
|
|
|
echo 'Entrypoint script'
|
|
|
|
cd /usr/src/app
|
|
|
|
cp /etc/sponsorblock/config.json . || cat <<EOF > config.json
|
|
|
|
{
|
|
|
|
"port": 8080,
|
2020-08-22 21:53:32 +02:00
|
|
|
"globalSalt": "[CHANGE THIS]",
|
|
|
|
"adminUserID": "[CHANGE THIS]",
|
|
|
|
"youtubeAPIKey": null,
|
2020-07-05 10:25:57 +02:00
|
|
|
"discordReportChannelWebhookURL": null,
|
|
|
|
"discordFirstTimeSubmissionsWebhookURL": null,
|
|
|
|
"discordAutoModWebhookURL": null,
|
2020-08-22 21:53:32 +02:00
|
|
|
"proxySubmission": null,
|
|
|
|
"behindProxy": "X-Forwarded-For",
|
|
|
|
"db": "./databases/sponsorTimes.db",
|
|
|
|
"privateDB": "./databases/private.db",
|
2020-07-05 10:25:57 +02:00
|
|
|
"createDatabaseIfNotExist": true,
|
2020-08-22 21:53:32 +02:00
|
|
|
"schemaFolder": "./databases",
|
|
|
|
"dbSchema": "./databases/_sponsorTimes.db.sql",
|
|
|
|
"privateDBSchema": "./databases/_private.db.sql",
|
2020-07-05 10:25:57 +02:00
|
|
|
"mode": "development",
|
|
|
|
"readOnly": false
|
|
|
|
}
|
|
|
|
EOF
|
2020-07-05 05:37:57 +02:00
|
|
|
node index.js
|