mirror of
https://github.com/rangermix/TwitchDropsMiner.git
synced 2026-05-28 16:09:39 +00:00
- Fix CI workflow to reference src/version.py instead of version.py - Update Python import paths for version extraction in AppImage job - Fix Dockerfile to use requirements.txt and copy src/ directory - Remove deprecated --web flag from Docker CMD - Remove obsolete version: '3.8' from docker-compose.yml - Add Docker build job to CI workflow with multi-arch support (amd64, arm64) - Push Docker images to GitHub Container Registry (ghcr.io) - Add OCI image labels with build metadata to Dockerfile - Update README with pre-built Docker image instructions - Update funding information All changes ensure compatibility with the refactored src/ package structure and enable automated Docker image publishing via GitHub Actions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
59 lines
1.8 KiB
Docker
59 lines
1.8 KiB
Docker
FROM python:3.11-slim
|
|
|
|
# Build arguments for metadata
|
|
ARG BUILD_DATE
|
|
ARG VCS_REF
|
|
ARG VERSION
|
|
|
|
# Labels following OCI Image Format Specification
|
|
LABEL org.opencontainers.image.created="${BUILD_DATE}" \
|
|
org.opencontainers.image.authors="rangermix" \
|
|
org.opencontainers.image.url="https://github.com/rangermix/TwitchDropsMiner" \
|
|
org.opencontainers.image.documentation="https://github.com/rangermix/TwitchDropsMiner/blob/master/README.md" \
|
|
org.opencontainers.image.source="https://github.com/rangermix/TwitchDropsMiner" \
|
|
org.opencontainers.image.version="${VERSION}" \
|
|
org.opencontainers.image.revision="${VCS_REF}" \
|
|
org.opencontainers.image.vendor="rangermix" \
|
|
org.opencontainers.image.title="Twitch Drops Miner" \
|
|
org.opencontainers.image.description="Automated Twitch drops mining application with web-based interface"
|
|
|
|
# Set environment variables
|
|
ENV PYTHONUNBUFFERED=1 \
|
|
PYTHONDONTWRITEBYTECODE=1 \
|
|
DOCKER_ENV=1 \
|
|
PORT=8080
|
|
|
|
# Set working directory
|
|
WORKDIR /app
|
|
|
|
# Install system dependencies
|
|
RUN apt-get update && apt-get install -y \
|
|
--no-install-recommends \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Copy requirements file
|
|
COPY requirements.txt .
|
|
|
|
# Install Python dependencies
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy application code
|
|
COPY main.py ./
|
|
COPY src/ ./src/
|
|
COPY lang/ ./lang/
|
|
COPY icons/ ./icons/
|
|
COPY web/ ./web/
|
|
|
|
# Create data directory for persistent storage
|
|
RUN mkdir -p /app/data && chmod 777 /app/data
|
|
|
|
# Expose web port
|
|
EXPOSE 8080
|
|
|
|
# Health check
|
|
HEALTHCHECK --interval=30s --timeout=3s --start-period=10s --retries=3 \
|
|
CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:8080/api/status')" || exit 1
|
|
|
|
# Run the application (web GUI is now default)
|
|
CMD ["python", "main.py", "-v"]
|