Reorganized files

This commit is contained in:
2025-12-20 19:20:48 -08:00
parent ea0a34258b
commit edd3693fb6
5 changed files with 8 additions and 8 deletions

View File

@@ -25,9 +25,9 @@ RUN mkdir -p /var/www && mkdir -p /var/www/data/speed
WORKDIR /var/www
# Copy web assets and scripts
COPY index.html /var/www/index.html
COPY run_speed_test.sh /usr/local/bin/run_speed_test.sh
COPY start.sh /usr/local/bin/start.sh
COPY src/index.html /var/www/index.html
COPY src/run_speed_test.sh /usr/local/bin/run_speed_test.sh
COPY src/start.sh /usr/local/bin/start.sh
# Ensure scripts are executable
RUN chmod +x /usr/local/bin/run_speed_test.sh /usr/local/bin/start.sh

View File

@@ -29,14 +29,14 @@ service cron start || cron || true
# Run the initial speed test once (in background) to populate files if possible
# We run it in background so server starts promptly. The cron will run hourly.
/usr/local/bin/run_speed_test.sh >> /var/log/cron.log 2>&1 || true &
/usr/local/bin/run_speed_test.sh >> /var/log/cron.log 2>&1 || true &
# Start busybox httpd serving /var/www on configured port in foreground
if command -v busybox >/dev/null 2>&1; then
echo "starting busybox httpd on port ${PORT} serving /var/www"
busybox httpd -f -p ${PORT} -h /var/www
busybox httpd -f -p ${PORT} -h /var/www
else
echo "warning: busybox httpd not found; container will keep running with cron only" >&2
# keep the script running so container doesn't exit
tail -f /var/log/cron.log
echo "warning: busybox httpd not found; container will keep running with cron only" >&2
# keep the script running so container doesn't exit
tail -f /var/log/cron.log
fi