diff --git a/Dockerfile b/Dockerfile index 2522e15..29d85de 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,9 @@ FROM alpine -RUN apk update && apk add --no-cache git php php-pdo_sqlite patch && sed -i "s/;extension=pdo_sqlite/extension=pdo_sqlite/" /etc/php83/php.ini && git clone https://github.com/OpenKJ/StandaloneRequestServer && cd StandaloneRequestServer && mkdir /db && sed -i "s/Default Venue/City Karaoke/;s/\/var\/www\/html\/okjweb/\/db/" settings.inc && apk del git +ENV VENUE "${VENUE}" +RUN apk update && apk add --no-cache git php php-pdo_sqlite patch && sed -i "s/;extension=pdo_sqlite/extension=pdo_sqlite/" /etc/php83/php.ini && git clone https://github.com/OpenKJ/StandaloneRequestServer && cd StandaloneRequestServer && mkdir /db && sed -i "s/\/var\/www\/html\/okjweb/\/db/" settings.inc && apk del git WORKDIR /StandaloneRequestServer COPY customization.patch /StandaloneRequestServer/customization.patch +COPY --chmod=0755 entrypoint.sh /entrypoint.sh RUN patch -p1 Incoming Requests``` -make sure ```Accept Requests``` is checked -make sure ```Automatically show this dialog on new requests``` is checked -click ```Update Remote DB``` +(customize VENUE to suit) -TODO: hotspot configuration +Start up OpenKJ +Select ```Tools -> Settings``` and go to the ```Network``` tab +Set ```Server URL``` to ```http://localhost/api.php``` (assuming you're +running this alongside OpenKJ) +Click ```Test``` to verify that the server is running, then click +```Close``` +Select ```Karaoke -> Incoming Requests``` +Make sure ```Accept Requests``` is checked +Make sure ```Automatically show this dialog on new requests``` is checked +Click ```Update Remote DB``` + +TODO: hotspot configuration +TODO: changes to the server code to run offline (no links to external +sources) diff --git a/customization.patch b/customization.patch index c38e29e..51f488f 100644 --- a/customization.patch +++ b/customization.patch @@ -1,16 +1,3 @@ -diff --git a/global.inc b/global.inc -index 1011664..c9aefef 100644 ---- a/global.inc -+++ b/global.inc -@@ -40,7 +40,7 @@ function navbar($backurl) - $backurl = index.php; - global $screensize; - echo "
Back"; - } - diff --git a/search.php b/search.php index 514d180..dae03cd 100644 --- a/search.php diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 0000000..b93b137 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env ash +cd /StandaloneRequestServer +sed -i "s/\$venueName = 'Default Venue';/\$venueName = '${VENUE}';/" settings.inc +sed -i "s/OpenKJ Songbook<\/span>/${VENUE} Songbook<\/span>/" global.inc +php -S 0.0.0.0:8000