fix: system_all_log.html ReferenceError and other updates
This commit is contained in:
79
Dockerfile
79
Dockerfile
@@ -1,44 +1,89 @@
|
||||
# FlaskFarm Docker Image
|
||||
# Ubuntu 22.04 + Python 3.10 for sc module support on ARM64/x86_64 Linux
|
||||
# FlaskFarm Docker Image v3.16
|
||||
# Ubuntu/Debian + Python 3.14 for maximum performance
|
||||
# Python 3.14.2 stable release
|
||||
|
||||
FROM python:3.10-slim-bullseye
|
||||
FROM python:3.14-slim
|
||||
|
||||
LABEL maintainer="yommi"
|
||||
LABEL description="FlaskFarm with sc module support"
|
||||
|
||||
# Install system dependencies
|
||||
# Install system dependencies and Korean locales
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
ffmpeg \
|
||||
git \
|
||||
curl \
|
||||
gcc \
|
||||
python3-dev \
|
||||
wget \
|
||||
gnupg \
|
||||
libxml2-dev \
|
||||
libxslt1-dev \
|
||||
zlib1g-dev \
|
||||
libjpeg-dev \
|
||||
libnss3 \
|
||||
libatk-bridge2.0-0 \
|
||||
libxcomposite1 \
|
||||
libxdamage1 \
|
||||
libxrandr2 \
|
||||
libgbm1 \
|
||||
libasound2 \
|
||||
libasound2-dev \
|
||||
libpangocairo-1.0-0 \
|
||||
libgtk-3-0 \
|
||||
pkg-config \
|
||||
libbz2-dev \
|
||||
libreadline-dev \
|
||||
libffi-dev \
|
||||
libssl-dev \
|
||||
build-essential \
|
||||
locales \
|
||||
&& sed -i -e 's/# ko_KR.UTF-8 UTF-8/ko_KR.UTF-8 UTF-8/' /etc/locale.gen \
|
||||
&& locale-gen \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
ENV LC_ALL=ko_KR.UTF-8 \
|
||||
LANG=ko_KR.UTF-8 \
|
||||
LANGUAGE=ko_KR.UTF-8
|
||||
|
||||
# Install Google Chrome Stable (amd64) or Chromium (arm64)
|
||||
ARG TARGETARCH
|
||||
RUN if [ "$TARGETARCH" = "amd64" ]; then \
|
||||
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor -o /usr/share/keyrings/google-chrome.gpg && \
|
||||
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/google-chrome.gpg] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list && \
|
||||
apt-get update && apt-get install -y google-chrome-stable; \
|
||||
else \
|
||||
apt-get update && apt-get install -y chromium chromium-driver; \
|
||||
fi && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Set working directory to /root
|
||||
WORKDIR /root
|
||||
|
||||
# Copy requirements first for layer caching
|
||||
COPY ff_3_10_requirements.txt .
|
||||
COPY ff_3_14_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
|
||||
# Install Python dependencies (including camoufox/zendriver)
|
||||
RUN grep -v "FlaskFarm" ff_3_14_requirements.txt > requirements_docker.txt \
|
||||
&& pip install --no-cache-dir -r requirements_docker.txt
|
||||
|
||||
# Copy FlaskFarm application
|
||||
COPY . .
|
||||
|
||||
# Expose port
|
||||
EXPOSE 9099
|
||||
RUN mkdir -p /data/plugins /data/db
|
||||
COPY gommi.sh /root/gommi.sh
|
||||
COPY config.yaml /data/config.yaml
|
||||
RUN chmod +x /root/gommi.sh
|
||||
|
||||
# Environment variables
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
ENV TZ=Asia/Seoul
|
||||
|
||||
# Health check
|
||||
# Health check (Matching EXPOSE port 9999)
|
||||
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
||||
CMD curl -f http://localhost:9099/ || exit 1
|
||||
CMD curl -f http://localhost:9999/ || exit 1
|
||||
|
||||
# Run FlaskFarm
|
||||
CMD ["python", "main.py"]
|
||||
# Expose port
|
||||
EXPOSE 9999/tcp
|
||||
|
||||
# Run FlaskFarm via gommi.sh in /root
|
||||
ENTRYPOINT ["/root/gommi.sh"]
|
||||
|
||||
Reference in New Issue
Block a user