FROM python:3.11-slim LABEL maintainer="Palladium ElectrumX Dashboard" LABEL description="Web Dashboard for Palladium Node and ElectrumX Server" WORKDIR /app # Install system dependencies for building Python packages and Docker CLI RUN apt-get update && apt-get install -y --no-install-recommends \ gcc \ python3-dev \ curl \ ca-certificates \ && install -m 0755 -d /etc/apt/keyrings \ && curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc \ && chmod a+r /etc/apt/keyrings/docker.asc \ && echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian bookworm stable" > /etc/apt/sources.list.d/docker.list \ && apt-get update \ && apt-get install -y --no-install-recommends docker-ce-cli \ && rm -rf /var/lib/apt/lists/* # Install Python dependencies COPY web-dashboard/requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy application files COPY web-dashboard/ . # Expose port EXPOSE 8080 # Health check HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ CMD python -c "import requests; requests.get('http://localhost:8080/api/health', timeout=5)" # Run the application CMD ["python", "app.py"]