···11+FROM rust:bookworm AS builder
22+WORKDIR /usr/src/strong-api-fetch
33+COPY . .
44+RUN cd strong-api-fetch && cargo install --path .
55+66+FROM debian:bookworm-slim
77+RUN apt-get update && apt-get install -y \
88+ openssl \
99+ ca-certificates \
1010+ curl \
1111+ cron
1212+1313+WORKDIR /usr/strong-api-fetch
1414+COPY --from=builder /usr/local/cargo/bin/strong-api-fetch /usr/bin/strong-api-fetch
1515+1616+# Add the cron job: run every 12 hours and log output
1717+RUN echo "*/1 * * * * /usr/bin/strong-api-fetch >> /var/log/cron.log 2>&1" > /etc/cron.d/strong-api-fetch
1818+1919+# Ensure the cron job file has proper permissions
2020+RUN chmod 0644 /etc/cron.d/strong-api-fetch
2121+2222+# Install the new cron job
2323+RUN crontab /etc/cron.d/strong-api-fetch
2424+2525+# Create the log file so that it exists when cron writes to it
2626+RUN touch /var/log/cron.log
2727+2828+# Run cron in the foreground
2929+CMD ["cron", "-f"]
+1-1
README.MD
···11-# Strong API data dump
11+# Strong API data fetch
2233This repo provides access to the Strong API to save workouts to your own database.
44The URL to the API backend is not provided here, but you can find it through the Strong app.