Commit Graph

2 Commits

Author SHA1 Message Date
suphicakir 91cb337c03 feat: add Docker image, production server and health check
- Multi-stage Dockerfile on node:24-slim, non-root, healthcheck, /app/data volume
- server.mjs wraps the Astro handler with brotli/gzip compression,
  security headers and graceful SIGTERM shutdown (npm start)
- GET /api/health/ reports server and view-counter DB status
- Move build-only packages to devDependencies (smaller runtime image)
- docker-compose.yml as an alternative for Dokploy Compose

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 02:58:50 +03:00
suphicakir c1c57c4f85 feat: add anonymous view counter with most-read sidebar
- node:sqlite storage in $DATA_DIR/views.db (no native deps)
- POST /api/views/<slug>/ counts once per visitor per 24h via
  daily-salted hash; IPs are never stored, bots are skipped
- GET /api/views/top/ feeds the sidebar's featured list, falling back
  to frontmatter-featured and latest posts when unavailable

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 01:15:12 +03:00