diff --git a/README.md b/README.md index 6ed85c3..0e17fd1 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,30 @@ # kiosk-menu-video +### 1. Install Docker and Dependancies + wget -O- https://raw.githubusercontent.com/stenny94/kiosk-menu/refs/heads/main/docker.sh | bash + +Run this one once per system setup. + +### 2. Container Setup + + wget -O- https://raw.githubusercontent.com/stenny94/kiosk-menu/refs/heads/main/setup.sh | bash + +Run this one if you wish to change the store/menu you would like, or if you need to update the container. + +### 3. Add to Startup (or Autostart) +Create an autostart/startup link to the file at the root directory called 'startup.sh', it is the file that will launch Firefox in kiosk mode at the menu server. + +--- + +And... that's it. I probably put way too much work into this, but that's okay. + +--- + +#### Personal Resources/Notes +Use the following command to build the Docker image. + + docker build -t stenny94/kiosk-menu . + +And use this command to push to the repository. + + docker push stenny94/kiosk-menu:latest diff --git a/beloit/menu.png b/beloit/menu.png new file mode 100644 index 0000000..5fa04bd Binary files /dev/null and b/beloit/menu.png differ diff --git a/clay/menu.png b/clay/menu.png new file mode 100644 index 0000000..72dab81 Binary files /dev/null and b/clay/menu.png differ diff --git a/docker.sh b/docker.sh new file mode 100644 index 0000000..fb04ab1 --- /dev/null +++ b/docker.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +sudo apt-get update +sudo apt-get install -y uidmap xautomation unclutter curl wget + +curl -fsSL https://get.docker.com -o get-docker.sh +sudo sh get-docker.sh + +dockerd-rootless-setuptool.sh install diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000..b165b96 --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,11 @@ +FROM nginx:latest + +ENV LOCATION=clay + +RUN apt-get update && apt-get install -y git + +COPY entrypoint.sh /entrypoint.sh +RUN sed -i 's/\r$//' /entrypoint.sh +RUN chmod +x /entrypoint.sh + +ENTRYPOINT ["/entrypoint.sh"] diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh new file mode 100644 index 0000000..50565a8 --- /dev/null +++ b/docker/entrypoint.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +cd /usr/share/nginx + +rm -rf html +mkdir html + +git clone https://github.com/stenny94/kiosk-menu.git html + +cd html +sed -i "s/*LOCATION/${LOCATION:-clay}/g" index.html +sed -i "s/*FILETYPE/${FILETYPE:-image}/g" index.html + +nginx -g "daemon off;" + diff --git a/index.html b/index.html new file mode 100644 index 0000000..f70744c --- /dev/null +++ b/index.html @@ -0,0 +1,29 @@ + + + + + + kiosk-menu + + + + Menu Image + + diff --git a/setup.sh b/setup.sh new file mode 100644 index 0000000..b7d7f51 --- /dev/null +++ b/setup.sh @@ -0,0 +1,15 @@ +sudo wget -O /startup.sh https://raw.githubusercontent.com/stenny94/kiosk-menu/refs/heads/main/startup.sh +sudo chmod a+x /startup.sh + +docker rm -f kiosk-menu + +echo "" +echo "" +echo "--------------------------------------------------" +read -p "Please enter your store location (e.g., clay, beloit, st_marys): " STORELOCATION < /dev/tty +echo "Setting location to: $STORELOCATION" +echo "--------------------------------------------------" +echo "" +echo "" + +docker run -d -p 8080:80 --name kiosk-menu --restart=always -e LOCATION="$STORELOCATION" stenny94/kiosk-menu:latest diff --git a/st_marys/menu.png b/st_marys/menu.png new file mode 100644 index 0000000..2feed1f Binary files /dev/null and b/st_marys/menu.png differ diff --git a/startup.sh b/startup.sh new file mode 100644 index 0000000..5aca6c3 --- /dev/null +++ b/startup.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +sleep 3 + +firefox --kiosk --new-window http://localhost:8080 + +xte 'mousemove 3840 2160'