venue is configurable at runtime
This commit is contained in:
@@ -1,7 +1,9 @@
|
|||||||
FROM alpine
|
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
|
WORKDIR /StandaloneRequestServer
|
||||||
COPY customization.patch /StandaloneRequestServer/customization.patch
|
COPY customization.patch /StandaloneRequestServer/customization.patch
|
||||||
|
COPY --chmod=0755 entrypoint.sh /entrypoint.sh
|
||||||
RUN patch -p1 <customization.patch && rm customization.patch && apk del patch
|
RUN patch -p1 <customization.patch && rm customization.patch && apk del patch
|
||||||
VOLUME /db
|
VOLUME /db
|
||||||
CMD /usr/bin/php -S 0.0.0.0:8000
|
CMD /entrypoint.sh
|
||||||
|
|||||||
31
README.md
31
README.md
@@ -1,14 +1,29 @@
|
|||||||
get the server up and running:
|
OpenKJ Songbook for Docker
|
||||||
|
==========================
|
||||||
|
|
||||||
|
This is a containerized [standalone songbook server](https://github.com/OpenKJ/StandaloneRequestServer/) for
|
||||||
|
[OpenKJ](https://github.com/OpenKJ/OpenKJ).
|
||||||
|
|
||||||
|
Get the server up and running:
|
||||||
|
|
||||||
```
|
```
|
||||||
docker build --no-cache -t openkj-server .
|
docker build --no-cache -t openkj-server .
|
||||||
docker run -d --name openkj -p 80:8000 -v openkj-db:/db --rm openkj-server
|
docker run -d --name openkj-songbook -p 80:8000 -v openkj-db:/db -e VENUE="City Karaoke" --rm openkj-server
|
||||||
```
|
```
|
||||||
|
|
||||||
start up OpenKJ
|
(customize VENUE to suit)
|
||||||
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
|
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)
|
||||||
|
|||||||
@@ -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 "<div class=navbar>
|
|
||||||
- <span class=title>OpenKJ Songbook</span>
|
|
||||||
+ <span class=title>City Karaoke Songbook</span>
|
|
||||||
</div><div class=mainbody><span class=backbtn><a class=button href=\"$backurl\" class=navbar id=backlink>Back</a></span>";
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/search.php b/search.php
|
diff --git a/search.php b/search.php
|
||||||
index 514d180..dae03cd 100644
|
index 514d180..dae03cd 100644
|
||||||
--- a/search.php
|
--- a/search.php
|
||||||
|
|||||||
5
entrypoint.sh
Normal file
5
entrypoint.sh
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
#!/usr/bin/env ash
|
||||||
|
cd /StandaloneRequestServer
|
||||||
|
sed -i "s/\$venueName = 'Default Venue';/\$venueName = '${VENUE}';/" settings.inc
|
||||||
|
sed -i "s/<span class=title>OpenKJ Songbook<\/span>/<span class=title>${VENUE} Songbook<\/span>/" global.inc
|
||||||
|
php -S 0.0.0.0:8000
|
||||||
Reference in New Issue
Block a user