Files
astro-website/scripts/refresh.sh
Santhosh Janardhanan 35afd9208f
Some checks failed
ci / site (push) Has been cancelled
publish-image / publish (push) Has been cancelled
Cron ready refresh script
2026-02-10 05:32:05 -05:00

7 lines
583 B
Bash

#!/usr/bin/env sh
## Fetch content, build the image, clear the cache and restart the container
docker run --rm -it --network container:$(docker compose ps -q redis) -v "${PWD}:/usr/src/app" -w /usr/src/app/site -e CACHE_REDIS_URL="redis://127.0.0.1:6379/0" node:24-alpine npm run fetch-content
docker build --build-arg PUBLIC_ENABLE_SW=true -t fast-website:local .
docker run --rm -it --network container:$(docker compose ps -q redis) -v "${PWD}:/usr/src/app" -w /usr/src/app/site -e CACHE_REDIS_URL="redis://127.0.0.1:6379/0" node:24-alpine npm run cache:clear
docker compose up -d