feat: Add Docker support and debug logging for plugin initialization.

This commit is contained in:
2026-01-01 22:57:40 +09:00
parent 97d203cb86
commit 3a9765f7ea
5 changed files with 95 additions and 5 deletions

44
Dockerfile Normal file
View File

@@ -0,0 +1,44 @@
# FlaskFarm Docker Image
# Ubuntu 22.04 + Python 3.10 for sc module support on ARM64/x86_64 Linux
FROM python:3.10-slim-bullseye
LABEL maintainer="yommi"
LABEL description="FlaskFarm with sc module support"
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
ffmpeg \
git \
curl \
gcc \
python3-dev \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy requirements first for layer caching
COPY ff_3_10_requirements.txt .
# Install Python dependencies (skip FlaskFarm package - running from source)
RUN grep -v "FlaskFarm" ff_3_10_requirements.txt > requirements_docker.txt \
&& pip install --no-cache-dir -r requirements_docker.txt \
&& pip install --no-cache-dir curl_cffi yt-dlp loguru
# Copy FlaskFarm application
COPY . .
# Expose port
EXPOSE 9099
# Environment variables
ENV PYTHONUNBUFFERED=1
ENV TZ=Asia/Seoul
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD curl -f http://localhost:9099/ || exit 1
# Run FlaskFarm
CMD ["python", "main.py"]