o11v4-podman/Containerfile
2026-02-22 17:02:56 -05:00

60 lines
2.8 KiB
Docker

###############################################################################
# o11v4 Containerfile — Podman Pods
#
# Single image used by BOTH containers in the pod:
# - licserver (runs server.js via PM2)
# - app (runs o11v4 binary watchdog)
#
# Build: podman build -t o11v4 .
# Run: .\pod-start.ps1 (see PODMAN-SETUP.md)
###############################################################################
FROM docker.io/library/node:20-slim
# ── System packages ─────────────────────────────────────────────────────────
RUN apt-get update && apt-get install -y --no-install-recommends \
python3 python3-pip python3-venv \
ffmpeg \
openssl \
procps \
curl \
&& rm -rf /var/lib/apt/lists/*
# ── Python venv + dependencies (used by example.py) ─────────────────────────
RUN python3 -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
RUN pip install --no-cache-dir requests PyJWT
# ── PM2 (Node process manager) ──────────────────────────────────────────────
RUN npm install -g pm2
# ── Application directory ───────────────────────────────────────────────────
RUN mkdir -p /home/o11/hls /home/o11/dl /home/o11/certs /home/o11/www
WORKDIR /home/o11
# ── Copy project files ──────────────────────────────────────────────────────
COPY server.js o11.cfg lic.cr run.sh ./
# If you have a www/ directory with static assets, uncomment:
# COPY www/ ./www/
# ── Install Express locally ─────────────────────────────────────────────────
RUN npm init -y > /dev/null 2>&1 && npm install express
# ── Copy binary + entrypoints ───────────────────────────────────────────────
COPY o11v4 ./o11v4
COPY entrypoint-licserver.sh /entrypoint-licserver.sh
COPY entrypoint-app.sh /entrypoint-app.sh
RUN chmod +x /home/o11/o11v4 \
/entrypoint-licserver.sh \
/entrypoint-app.sh
# ── Expose ports ────────────────────────────────────────────────────────────
# 80 - License server HTTP
# 443 - License server HTTPS
# 5454 - License server HTTP alt
# 8484 - o11v4 main application
EXPOSE 80 443 5454 8484