Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# ============================================
# RetroIPTVGuide - Dockerfile
# ============================================
FROM python:3.12-slim

LABEL maintainer="thehack904"
LABEL description="RetroIPTVGuide Flask + SQLite Web App"
LABEL version="3.1.0"

# --------------------------------------------
# Environment setup
# --------------------------------------------
ENV PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1 \
APP_HOME=/app

WORKDIR $APP_HOME

# --------------------------------------------
# Install minimal system dependencies
# --------------------------------------------
RUN apt-get update && apt-get install -y --no-install-recommends \
tini \
curl \
&& rm -rf /var/lib/apt/lists/*

# --------------------------------------------
# Copy and install Python dependencies
# --------------------------------------------
COPY requirements.txt ./
RUN pip install --upgrade pip && pip install -r requirements.txt

# --------------------------------------------
# Copy application code
# --------------------------------------------
COPY . .

# --------------------------------------------
# Create persistent directories for TrueNAS mounts
# --------------------------------------------
RUN mkdir -p /app/config /app/logs /app/data

# --------------------------------------------
# Expose Flask port
# --------------------------------------------
EXPOSE 5000

# --------------------------------------------
# Use tini as init for graceful shutdown handling
# --------------------------------------------
ENTRYPOINT ["/usr/bin/tini", "--"]

# --------------------------------------------
# Start the Flask app
# (Change app.py to wsgi.py if you ever switch to gunicorn)
# --------------------------------------------
CMD ["python", "app.py"]