Bind mounts override the image's chown, so the container's nextjs
user (uid 1001) couldn't write to /app/data when it was mounted from
a host dir owned by someone else. Start as root, fix ownership in an
entrypoint, then drop to nextjs via su-exec.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Multi-stage Alpine Dockerfile producing a standalone Next.js image
with the better-sqlite3 native addon included. Gitea workflow builds
on push to main and on v* tags, pushing to the Gitea registry using
the REGISTRY_URL variable and REGISTRY_TOKEN secret. Compose file
mounts ./data so alerts.db and settings.json persist across restarts.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>