From 44f37f36677a275fe3e5206c0915dd8d39bef5e4 Mon Sep 17 00:00:00 2001 From: Risu <79110363+risu729@users.noreply.github.com> Date: Sun, 5 Apr 2026 05:28:30 +1000 Subject: [PATCH 1/2] Fix Docker build command --- Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7db1193..bb0574b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,5 +7,4 @@ ARG HASURAGRES_API_KEY ENV TIMETABLE_API_URL=https://timetable.unsw.edu.au/year/ -RUN cargo r -- scrape_n_batch_insert -release - +RUN cargo run --release -- scrape_n_batch_insert --year latest-with-data From 2a28ed0a6a46d41088cecb3e14429b856da99884 Mon Sep 17 00:00:00 2001 From: Risu <79110363+risu729@users.noreply.github.com> Date: Sun, 5 Apr 2026 05:51:20 +1000 Subject: [PATCH 2/2] Fix Docker runtime execution --- Dockerfile | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index bb0574b..371112f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,22 @@ -FROM rust:1.80 +FROM rust:1.80 AS builder + WORKDIR /app COPY . . -ARG HASURAGRES_URL -ARG HASURAGRES_API_KEY +RUN cargo build --release + +FROM debian:bookworm-slim + +WORKDIR /app + +RUN apt-get update \ + && apt-get install -y --no-install-recommends ca-certificates libssl3 \ + && rm -rf /var/lib/apt/lists/* + +COPY --from=builder /app/target/release/spooderman /usr/local/bin/spooderman +COPY --from=builder /app/sql ./sql ENV TIMETABLE_API_URL=https://timetable.unsw.edu.au/year/ -RUN cargo run --release -- scrape_n_batch_insert --year latest-with-data +ENTRYPOINT ["spooderman"] +CMD ["scrape_n_batch_insert", "--year", "latest-with-data"]