#!/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