changed speedtest service to ookla
This commit is contained in:
@@ -1,14 +1,20 @@
|
||||
FROM python:3.12-slim
|
||||
|
||||
RUN apt-get update && apt-get install -y cron git && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
COPY requirements.txt .
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
# Install cron, curl, and the official Ookla Speedtest repository
|
||||
RUN apt-get update && apt-get install -y cron curl \
|
||||
&& curl -s https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.deb.sh | bash \
|
||||
&& apt-get install -y speedtest \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY . .
|
||||
COPY crontab /etc/cron.d/speedtest
|
||||
|
||||
RUN chmod 0644 /etc/cron.d/speedtest && crontab /etc/cron.d/speedtest
|
||||
# Set up the cron job
|
||||
COPY crontab /etc/cron.d/speedtest-cron
|
||||
RUN chmod 0644 /etc/cron.d/speedtest-cron
|
||||
RUN crontab /etc/cron.d/speedtest-cron
|
||||
|
||||
ENV DB_PATH=/app/speedtests.db
|
||||
|
||||
# Dump env vars for cron and start the daemon
|
||||
CMD printenv > /etc/environment && cron -f
|
||||
|
||||
Reference in New Issue
Block a user