Cron ready refresh script
Some checks failed
ci / site (push) Has been cancelled
publish-image / publish (push) Has been cancelled

This commit is contained in:
2026-02-10 05:32:05 -05:00
parent e2ef436d34
commit 35afd9208f
2 changed files with 11 additions and 2 deletions

View File

@@ -9,6 +9,9 @@ services:
PUBLIC_ENABLE_SW: "true"
ports:
- "8080:80"
networks:
- fast-website-network
redis:
image: redis:7-alpine
@@ -20,3 +23,9 @@ services:
interval: 5s
timeout: 3s
retries: 20
networks:
- fast-website-network
networks:
fast-website-network:
driver: bridge

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env sh
## Fetch content, build the image, clear the cache and restart the container
docker run -it -v $(pwd)/site:/usr/src/app -w /usr/src/app node:24-alpine npm run fetch-content
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 -it -v $(pwd)/site:/usr/src/app -w /usr/src/app node:24-alpine npm run cache:clear
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