costco-watch: ntfy alert when a Costco tire is back in stock
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
# costco-watch image
|
||||
|
||||
Dependency-free Node service (node:22-alpine + curl for the healthcheck).
|
||||
Source: https://git.alexzaw.dev/alexz/costco-watch (working copy:
|
||||
~/projects/costco-watch). Build + push with ./build.sh.
|
||||
|
||||
Gotchas:
|
||||
- TARGET_URL must go through the costco-tire cloudflared proxy AND that
|
||||
hostname needs a Cloudflare Transform Rule adding browser headers
|
||||
(User-Agent, Accept, Accept-Language, Sec-Fetch-*). Without it Costco stalls
|
||||
the request until timeout and the checker reports "error"/"blocked".
|
||||
- State (last stock value, transition history) lives in ${APP_DATA_DIR}/data;
|
||||
wiping it means the next check can re-alert.
|
||||
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
IMAGE_NAME="${IMAGE_NAME:-git.alexzaw.dev/alexz/costco-watch}"
|
||||
IMAGE_TAG="${IMAGE_TAG:-latest}"
|
||||
SRC="${SRC:-$HOME/projects/costco-watch}"
|
||||
docker build "$@" -t "${IMAGE_NAME}:${IMAGE_TAG}" "$SRC"
|
||||
docker push "${IMAGE_NAME}:${IMAGE_TAG}"
|
||||
Reference in New Issue
Block a user