aboutsummaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2026-10-29 19:58:05 -0700
committerPinapelz <yukais@pinapelz.com>2026-10-29 19:58:05 -0700
commit96bfe2e1505b4ae250f2d5201f9541ceb01cec84 (patch)
treeb2164a76dc3aa5b69e160d1135d3385bcbe6108d /Dockerfile
parent150858067059ba615c548f826bb343589993b4bb (diff)
ts web slopify code
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile44
1 files changed, 44 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..f82982c
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,44 @@
+# Multi-arch (linux/amd64, linux/arm64) image for the TeamSpeak 6 dashboard + browser voice gateway.
+FROM node:22-bookworm-slim AS node-runtime
+
+FROM python:3.13-slim-bookworm
+
+# Copy Node.js 22 runtime (required by @honeybbq/teamspeak and process.loadEnvFile)
+COPY --from=node-runtime /usr/local/bin/node /usr/local/bin/node
+COPY --from=node-runtime /usr/local/lib/node_modules /usr/local/lib/node_modules
+RUN ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm \
+ && useradd --create-home --shell /bin/bash appuser
+
+WORKDIR /app
+
+# Install Python dependencies first (cached layer)
+COPY pyproject.toml ./
+RUN pip install --no-cache-dir \
+ "flask>=3.1.3" \
+ "flask-cors>=6.0.5" \
+ "python-dotenv>=1.0.1" \
+ "requests>=2.34.2"
+
+# Install Node.js voice gateway dependencies (pure JS + WASM, no native compilation needed on arm64)
+COPY gateway/package.json gateway/package-lock.json* ./gateway/
+RUN npm --prefix ./gateway ci --omit=dev --no-audit --no-fund \
+ || npm --prefix ./gateway install --omit=dev --no-audit --no-fund
+
+# Copy application source
+COPY app.py config.py run.py config.toml index.css ./
+COPY static ./static
+COPY gateway/src ./gateway/src
+
+RUN chown -R appuser:appuser /app
+USER appuser
+
+ENV PYTHONUNBUFFERED=1 \
+ WEB_HOST=0.0.0.0 \
+ WEB_PORT=5000
+
+EXPOSE 5000
+
+HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
+ CMD node -e "fetch('http://127.0.0.1:' + (process.env.WEB_PORT || 5000) + '/healthz').then(r => process.exit(r.ok ? 0 : 1)).catch(() => process.exit(1))"
+
+CMD ["python", "run.py"]
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage