Initial import with modified Dockerfile for env-based config generation

This commit is contained in:
2026-06-22 11:56:10 +03:00
parent 28fa7537ac
commit 6bf27aa40e
25 changed files with 3228 additions and 0 deletions
+45
View File
@@ -0,0 +1,45 @@
#!/bin/sh
set -e
# Generate config.yaml from environment variables
mkdir -p /app/config
cat > /app/config/config.yaml << 'YAMLEOF'
server:
port: 8080
webhook_secret: "${GITEA_WEBHOOK_SECRET}"
identity:
provider: gitea
cache_ttl: 24h
gitea:
url: "${GITEA_URL}"
token: "${GITEA_API_TOKEN}"
notification:
provider: slack
slack:
bot_token: "${SLACK_BOT_TOKEN}"
database:
driver: sqlite
dsn: "./data/notifications.db"
rules:
pr:
notify_owner: true
notify_reviewers: true
notify_assignees: true
issue:
notify_assignees: true
comment:
notify_mentioned: true
notify_thread_owner: true
notify_reviewers: true
YAMLEOF
# Expand env vars in config
# The Go app uses os.ExpandEnv so it handles ${VAR} syntax itself
# We just need to ensure the file is present
exec ./gitea-notification-hub -config /app/config/config.yaml