Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
d82ae81e28
|
|||
|
f8f6a8346d
|
|||
|
48f8efce3f
|
|||
|
3a42eab7de
|
|||
|
41bc1a7ef5
|
|||
|
489d7c645b
|
|||
|
122e0fb932
|
|||
|
05b62d1ffb
|
@@ -0,0 +1,36 @@
|
|||||||
|
FROM ubuntu:24.04
|
||||||
|
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
# Install PipeWire, WirePlumber, PulseAudio compat, ALSA, and D-Bus
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
pipewire \
|
||||||
|
pipewire-pulse \
|
||||||
|
pipewire-alsa \
|
||||||
|
wireplumber \
|
||||||
|
dbus-x11 \
|
||||||
|
curl \
|
||||||
|
udev \
|
||||||
|
alsa-utils \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Download the precompiled binary based on architecture
|
||||||
|
RUN ARCH=$(uname -m) && \
|
||||||
|
if [ "$ARCH" = "aarch64" ]; then \
|
||||||
|
curl -L -o pipewire-web-remote https://github.com/oudeis01/pipewire-web-remote/releases/latest/download/pipewire-web-remote-aarch64; \
|
||||||
|
elif [ "$ARCH" = "x86_64" ]; then \
|
||||||
|
curl -L -o pipewire-web-remote https://github.com/oudeis01/pipewire-web-remote/releases/latest/download/pipewire-web-remote-x86_64; \
|
||||||
|
else \
|
||||||
|
echo "Unsupported architecture"; exit 1; \
|
||||||
|
fi && \
|
||||||
|
chmod +x pipewire-web-remote
|
||||||
|
|
||||||
|
COPY start.sh /start.sh
|
||||||
|
RUN chmod +x /start.sh
|
||||||
|
|
||||||
|
# The Web UI defaults to 8080
|
||||||
|
EXPOSE 8080
|
||||||
|
|
||||||
|
CMD ["/start.sh"]
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Setup directories for PipeWire and PulseAudio sockets
|
||||||
|
export XDG_RUNTIME_DIR=/tmp/pw-runtime
|
||||||
|
mkdir -p /tmp/pw-runtime
|
||||||
|
|
||||||
|
export PULSE_RUNTIME_PATH=/tmp/pulse
|
||||||
|
mkdir -p /tmp/pulse
|
||||||
|
|
||||||
|
# Initialize local DBus session (required by PipeWire/WirePlumber)
|
||||||
|
export DBUS_SESSION_BUS_ADDRESS=$(dbus-daemon --session --print-address --fork)
|
||||||
|
|
||||||
|
echo "Starting PipeWire..."
|
||||||
|
pipewire &
|
||||||
|
sleep 1
|
||||||
|
|
||||||
|
echo "Starting WirePlumber session manager..."
|
||||||
|
wireplumber &
|
||||||
|
sleep 1
|
||||||
|
|
||||||
|
echo "Starting PipeWire-Pulse compatibility layer..."
|
||||||
|
pipewire-pulse &
|
||||||
|
sleep 1
|
||||||
|
|
||||||
|
# Ensure the PulseAudio socket is accessible to other containers
|
||||||
|
chmod -R 777 /tmp/pulse || true
|
||||||
|
|
||||||
|
echo "Starting PipeWire Web Remote..."
|
||||||
|
exec ./pipewire-web-remote --allow-external
|
||||||
@@ -16,15 +16,29 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- DISPLAY=:0
|
- DISPLAY=:0
|
||||||
|
|
||||||
|
audio-manager:
|
||||||
|
build: ./audio-manager
|
||||||
|
restart: always
|
||||||
|
privileged: true # Required for proper ALSA/Hardware audio access in some setups
|
||||||
|
ports:
|
||||||
|
- "8449:8449"
|
||||||
|
volumes:
|
||||||
|
- pulse-socket:/tmp/pulse
|
||||||
|
- /run/udev:/run/udev:ro
|
||||||
|
devices:
|
||||||
|
- "/dev/snd:/dev/snd"
|
||||||
|
|
||||||
kiosk-1:
|
kiosk-1:
|
||||||
build: ./kiosk
|
build: ./kiosk
|
||||||
restart: always
|
restart: always
|
||||||
depends_on:
|
depends_on:
|
||||||
- display-manager
|
- display-manager
|
||||||
|
- audio-manager
|
||||||
ports:
|
ports:
|
||||||
- "5011:5011"
|
- "5011:5011"
|
||||||
volumes:
|
volumes:
|
||||||
- x11-socket:/tmp/.X11-unix
|
- x11-socket:/tmp/.X11-unix
|
||||||
|
- pulse-socket:/tmp/pulse
|
||||||
devices:
|
devices:
|
||||||
- "/dev/dri:/dev/dri"
|
- "/dev/dri:/dev/dri"
|
||||||
environment:
|
environment:
|
||||||
@@ -34,16 +48,19 @@ services:
|
|||||||
- LAUNCH_URL=https://github.com
|
- LAUNCH_URL=https://github.com
|
||||||
- KIOSK=1
|
- KIOSK=1
|
||||||
- GPU=1
|
- GPU=1
|
||||||
|
- PULSE_SERVER=unix:/tmp/pulse/native
|
||||||
|
|
||||||
kiosk-2:
|
kiosk-2:
|
||||||
build: ./kiosk
|
build: ./kiosk
|
||||||
restart: always
|
restart: always
|
||||||
depends_on:
|
depends_on:
|
||||||
- display-manager
|
- display-manager
|
||||||
|
- audio-manager
|
||||||
ports:
|
ports:
|
||||||
- "5012:5012"
|
- "5012:5012"
|
||||||
volumes:
|
volumes:
|
||||||
- x11-socket:/tmp/.X11-unix
|
- x11-socket:/tmp/.X11-unix
|
||||||
|
- pulse-socket:/tmp/pulse
|
||||||
devices:
|
devices:
|
||||||
- "/dev/dri:/dev/dri"
|
- "/dev/dri:/dev/dri"
|
||||||
environment:
|
environment:
|
||||||
@@ -53,6 +70,8 @@ services:
|
|||||||
- LAUNCH_URL=https://google.com
|
- LAUNCH_URL=https://google.com
|
||||||
- KIOSK=1
|
- KIOSK=1
|
||||||
- GPU=1
|
- GPU=1
|
||||||
|
- PULSE_SERVER=unix:/tmp/pulse/native
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
x11-socket:
|
x11-socket:
|
||||||
|
pulse-socket:
|
||||||
|
|||||||
@@ -7,6 +7,11 @@ RUN apt-get update && apt-get install -y \
|
|||||||
scrot \
|
scrot \
|
||||||
jq \
|
jq \
|
||||||
curl \
|
curl \
|
||||||
|
libpulse0 \
|
||||||
|
alsa-utils \
|
||||||
|
libgles2 \
|
||||||
|
libegl1 \
|
||||||
|
libgl1-mesa-dri \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|||||||
+8
-4
@@ -78,7 +78,12 @@ function buildFlags(geometry) {
|
|||||||
`--user-data-dir=/data/chromium-${MONITOR}`,
|
`--user-data-dir=/data/chromium-${MONITOR}`,
|
||||||
`--window-position=${geometry.x},${geometry.y}`,
|
`--window-position=${geometry.x},${geometry.y}`,
|
||||||
`--window-size=${geometry.width},${geometry.height}`,
|
`--window-size=${geometry.width},${geometry.height}`,
|
||||||
'--autoplay-policy=no-user-gesture-required'
|
'--autoplay-policy=no-user-gesture-required',
|
||||||
|
// Hardware video decoding and zero-copy rendering optimizations
|
||||||
|
'--ignore-gpu-blocklist',
|
||||||
|
'--enable-features=VaapiVideoDecoder,VaapiVideoEncoder',
|
||||||
|
'--enable-zero-copy',
|
||||||
|
'--use-gl=egl'
|
||||||
];
|
];
|
||||||
|
|
||||||
if (isKiosk) {
|
if (isKiosk) {
|
||||||
@@ -216,9 +221,8 @@ app.post('/url', async (req, res) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we're in kiosk mode, --app flag is used so changing URL requires restart to stay full screen
|
// If gpu or kiosk settings changed, we must restart the browser
|
||||||
// If we're not in kiosk mode, we can just navigate the page
|
if (needRestart) {
|
||||||
if (needRestart || isKiosk) {
|
|
||||||
await startChromium();
|
await startChromium();
|
||||||
} else if (page) {
|
} else if (page) {
|
||||||
await page.goto(currentUrl);
|
await page.goto(currentUrl);
|
||||||
|
|||||||
Reference in New Issue
Block a user