Feature 2: Commit-Feed — Gitea-Webhook, Discord-Embeds, SQLite-Archiv

- Fastify-Webserver mit /health und /webhooks/gitea (HMAC-SHA256-Signaturprüfung, timing-safe)
- Push-Commits werden in SQLite gespeichert (Dedupe per SHA) und als Embed gepostet
- Dockerfile auf node:22-slim (glibc-Prebuilds für better-sqlite3), Port 3080 published
- README: Anleitung für Cloudflare-DNS, Nginx Proxy Manager (bot.d4rkst3r.de) und Gitea-Webhook

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-22 23:27:33 +02:00
co-authored by Claude Opus 4.8
parent 2b3fa3eb69
commit 46d6a3f927
11 changed files with 1357 additions and 17 deletions
+12
View File
@@ -17,4 +17,16 @@ export const config = {
discordClientId: required('DISCORD_CLIENT_ID'),
// Optional: Guild-ID für sofortige Slash-Command-Registrierung (global dauert bis zu 1h)
discordGuildId: process.env.DISCORD_GUILD_ID || null,
// Commit-Feed (Feature 2)
// Kanal, in den Push-Embeds gepostet werden
commitChannelId: required('COMMIT_CHANNEL_ID'),
// Shared Secret — muss identisch im Gitea-Webhook eingetragen sein
giteaWebhookSecret: required('GITEA_WEBHOOK_SECRET'),
// HTTP-Server (Webhooks, später Webinterface)
httpPort: Number(process.env.HTTP_PORT) || 3080,
// SQLite-Datei (im Container: /app/data → ecobot_data-Volume)
dbPath: process.env.DB_PATH || './data/ecobot.db',
};