Files
peertube-collector/Dockerfile
2025-02-15 16:23:48 +01:00

27 lines
725 B
Docker

FROM debian:bookworm-slim
# Install Python
RUN apt-get update && apt-get install -y python3 python3-pip python3-venv
# Install dependencies with venv
# Create and activate a virtual environment
RUN python3 -m venv /app/venv
ENV PATH="/app/venv/bin:$PATH"
# Install dependencies with venv
COPY requirements.txt /app/requirements.txt
RUN /app/venv/bin/pip install --no-cache-dir -r /app/requirements.txt
# Install curl
RUN apt-get update && apt-get install -y curl
# Copy the application
COPY main.py /app
COPY utils/ /app/utils
WORKDIR /app
# Run the application
CMD ["/app/venv/bin/python", "main.py"]
# Healthcheck
HEALTHCHECK --interval=5s --timeout=10s --retries=5 CMD curl -f http://localhost/healthcheck || exit 1