Changes to be committed:
modified: README.md new file: beloit/menu.png new file: clay/menu.png new file: docker.sh new file: docker/Dockerfile new file: docker/entrypoint.sh new file: index.html new file: setup.sh new file: st_marys/menu.png new file: startup.sh
This commit is contained in:
28
README.md
28
README.md
@@ -1,2 +1,30 @@
|
||||
# kiosk-menu-image
|
||||
### 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
|
||||
|
||||
BIN
beloit/menu.png
Normal file
BIN
beloit/menu.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 266 KiB |
BIN
clay/menu.png
Normal file
BIN
clay/menu.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 MiB |
9
docker.sh
Normal file
9
docker.sh
Normal file
@@ -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
|
||||
11
docker/Dockerfile
Normal file
11
docker/Dockerfile
Normal file
@@ -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"]
|
||||
15
docker/entrypoint.sh
Normal file
15
docker/entrypoint.sh
Normal file
@@ -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;"
|
||||
|
||||
29
index.html
Normal file
29
index.html
Normal file
@@ -0,0 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>kiosk-menu</title>
|
||||
<style>
|
||||
/* Ensure the media fills the entire screen without scrollbars */
|
||||
html, body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
background-color: black; /* Prevents white flash during load */
|
||||
}
|
||||
|
||||
img {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
display: block;
|
||||
object-fit: cover;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<img src="*LOCATION/menu.png" alt="Menu Image">
|
||||
</body>
|
||||
</html>
|
||||
15
setup.sh
Normal file
15
setup.sh
Normal file
@@ -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
|
||||
BIN
st_marys/menu.png
Normal file
BIN
st_marys/menu.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
7
startup.sh
Normal file
7
startup.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
sleep 3
|
||||
|
||||
firefox --kiosk --new-window http://localhost:8080
|
||||
|
||||
xte 'mousemove 3840 2160'
|
||||
Reference in New Issue
Block a user