mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-11-07 21:58:02 +00:00
feat(nextcloud): enable custom Alpine-based Whiteboard image with Chromium & ffmpeg support
- Added role tasks to deploy templated Dockerfile for Whiteboard service - Configured build context and custom image name (nextcloud_whiteboard_custom) - Increased PID limits and shm_size for stable recording - Adjusted user ID variable naming consistency - Integrated path_join for service directory variables - Fixed build permissions (install as root, revert to nobody) Reference: ChatGPT conversation https://chatgpt.com/share/68f771c6-0e98-800f-99ca-9e367f4cd0c2
This commit is contained in:
27
roles/web-app-nextcloud/templates/Dockerfiles/Whiteboard.j2
Normal file
27
roles/web-app-nextcloud/templates/Dockerfiles/Whiteboard.j2
Normal file
@@ -0,0 +1,27 @@
|
||||
FROM {{ NEXTCLOUD_WHITEBOARD_IMAGE }}:{{ NEXTCLOUD_WHITEBOARD_VERSION }}
|
||||
|
||||
# Temporarily switch to root so we can install packages
|
||||
USER 0
|
||||
|
||||
# Install Chromium, ffmpeg, fonts, and runtime libraries for headless operation on Alpine
|
||||
RUN apk add --no-cache \
|
||||
chromium \
|
||||
ffmpeg \
|
||||
nss \
|
||||
freetype \
|
||||
harfbuzz \
|
||||
ttf-dejavu \
|
||||
ttf-liberation \
|
||||
udev \
|
||||
ca-certificates \
|
||||
&& update-ca-certificates
|
||||
|
||||
# Ensure a consistent Chromium binary path
|
||||
RUN if [ -x /usr/bin/chromium-browser ]; then ln -sf /usr/bin/chromium-browser /usr/bin/chromium; fi
|
||||
|
||||
# Environment variables used by Puppeteer
|
||||
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium \
|
||||
PUPPETEER_SKIP_DOWNLOAD=true
|
||||
|
||||
# Switch back to the original non-root user (nobody)
|
||||
USER 65534
|
||||
@@ -67,8 +67,12 @@
|
||||
{{ service_name }}:
|
||||
{% set container_port = NEXTCLOUD_WHITEBOARD_PORT_INTERNAL %}
|
||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||
build:
|
||||
context: .
|
||||
dockerfile: {{ NEXTCLOUD_WHITEBOARD_SERVICE_DOCKERFILE }}
|
||||
pull_policy: never
|
||||
{% include 'roles/docker-container/templates/healthcheck/nc.yml.j2' %}
|
||||
image: "{{ NEXTCLOUD_WHITEBOARD_IMAGE }}:{{ NEXTCLOUD_WHITEBOARD_VERSION }}"
|
||||
image: "{{ NEXTCLOUD_WHITEBOARD_CUSTOM_IMAGE }}"
|
||||
container_name: {{ NEXTCLOUD_WHITEBOARD_CONTAINER }}
|
||||
volumes:
|
||||
- whiteboard_tmp:/tmp
|
||||
@@ -76,6 +80,7 @@
|
||||
|
||||
expose:
|
||||
- "{{ container_port }}"
|
||||
shm_size: 1g
|
||||
networks:
|
||||
default:
|
||||
ipv4_address: 192.168.102.71
|
||||
|
||||
@@ -65,6 +65,4 @@ CHROMIUM_FLAGS=--headless=new --no-sandbox --disable-gpu --disable-dev-shm-usage
|
||||
# Falls das Image Chromium mitbringt – Pfad meistens /usr/bin/chromium oder /usr/bin/chromium-browser:
|
||||
PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
|
||||
PUPPETEER_SKIP_DOWNLOAD=true
|
||||
# Deactivated @todo implement
|
||||
WHITEBOARD_ENABLE_RECORDING=false
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user