diff --git a/Dockerfile b/Dockerfile index 4fe1f0f..8227b05 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/docker_push.sh b/scripts/docker_push.sh similarity index 100% rename from docker_push.sh rename to scripts/docker_push.sh diff --git a/index.html b/src/index.html similarity index 100% rename from index.html rename to src/index.html diff --git a/run_speed_test.sh b/src/run_speed_test.sh similarity index 100% rename from run_speed_test.sh rename to src/run_speed_test.sh diff --git a/start.sh b/src/start.sh similarity index 79% rename from start.sh rename to src/start.sh index ebd49a6..ba8b0e2 100644 --- a/start.sh +++ b/src/start.sh @@ -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