25 lines
770 B
Bash
25 lines
770 B
Bash
#!/bin/bash
|
|
set -e
|
|
|
|
# Start cron daemon in background
|
|
cron
|
|
|
|
# Configure git for SSH
|
|
mkdir -p /root/.ssh
|
|
chmod 700 /root/.ssh
|
|
|
|
# Trust gitea.jeffemmett.com host key
|
|
ssh-keyscan -p 223 gitea.jeffemmett.com >> /root/.ssh/known_hosts 2>/dev/null || true
|
|
|
|
# Configure git to use SSH key
|
|
if [ -f "/root/.ssh/gitea_ed25519" ]; then
|
|
export GIT_SSH_COMMAND="ssh -i /root/.ssh/gitea_ed25519 -o StrictHostKeyChecking=no"
|
|
fi
|
|
|
|
# Run initial Gitea scan on startup
|
|
echo "Running initial Gitea repository scan..."
|
|
cd /app && bun run src/aggregator/gitea-scanner.ts --verbose || echo "Initial scan failed, will retry via cron"
|
|
|
|
# Start the aggregator with all project paths
|
|
exec bun run src/aggregator/index.ts --port 6420 --paths "/projects/websites,/projects/apps,/projects/gitea"
|