diff --git a/Dockerfile b/Dockerfile index b32fe20..efca3de 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ WORKDIR /usr/src/app COPY package.json . RUN npm install COPY index.js . -COPY src . +COPY src src COPY entrypoint.sh . EXPOSE 8080 -ENTRYPOINT ./entrypoint.sh \ No newline at end of file +CMD ./entrypoint.sh \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh index f6d846f..5e14a9e 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,4 +1,39 @@ -#!bin/bash +#!/bin/bash set -e -cp /etc/sponsorblock/config.json . +echo 'Entrypoint script' +cd /usr/src/app +cp /etc/sponsorblock/config.json . || cat < config.json +{ + "port": 8080, + "mysql": { + "host": "127.0.0.1", + "port": 3306, + "database": "sponsorblock", + "user": "sponsorblock", + "password": "sponsorblock" + }, + "privateMysql": { + "host": "127.0.0.1", + "port": 3306, + "database": "sponsorblock_private", + "user": "sponsorblock", + "password": "sponsorblock" + }, + "globalSalt": "", + "adminUserID": "", + "youtubeAPIKey": "", + "discordReportChannelWebhookURL": null, + "discordFirstTimeSubmissionsWebhookURL": null, + "discordAutoModWebhookURL": null, + "behindProxy": true, + "db": null, + "privateDB": null, + "createDatabaseIfNotExist": true, + "schemaFolder": null, + "dbSchema": null, + "privateDBSchema": null, + "mode": "development", + "readOnly": false +} +EOF node index.js \ No newline at end of file