-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
208 lines (172 loc) · 12.5 KB
/
.env.example
File metadata and controls
208 lines (172 loc) · 12.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
# ═══════════════════════════════════════════════════════════════════════════════
# GitHub Backup - Environment Configuration
# ═══════════════════════════════════════════════════════════════════════════════
# Copy this file to .env and fill in your values
# ═══════════════════════════════════════════════════════════════════════════════
# ───────────────────────────────────────────────────────────────────────────────
# GitHub Configuration
# ───────────────────────────────────────────────────────────────────────────────
# Organization or username to backup
GITHUB_OWNER=my-organization
# ─────────────────────────────────────────────────────────────────────────────
# Authentication Mode
# ─────────────────────────────────────────────────────────────────────────────
#
# ┌─────────────────┬──────────────────────┬─────────────────────────────────┐
# │ Mode │ GITHUB_PAT │ What you get │
# ├─────────────────┼──────────────────────┼─────────────────────────────────┤
# │ Authenticated │ Set (ghp_xxx...) │ Private + public repos │
# │ │ │ 5000 requests/hour │
# │ │ │ Full metadata (issues, PRs) │
# ├─────────────────┼──────────────────────┼─────────────────────────────────┤
# │ Unauthenticated │ Empty or not set │ Public repos ONLY │
# │ │ │ 60 requests/hour │
# │ │ │ Basic metadata only │
# └─────────────────┴──────────────────────┴─────────────────────────────────┘
#
# For public repos only: Leave GITHUB_PAT empty or comment it out
# GITHUB_PAT=
#
# ─────────────────────────────────────────────────────────────────────────────
# Personal Access Token (PAT) - Required for private repos
# ─────────────────────────────────────────────────────────────────────────────
#
# CLASSIC PAT (Settings > Developer settings > Personal access tokens > Tokens (classic))
# ─────────────────────────────────────────────────────────────────────────────
# Required scopes:
# [x] repo - Full repository access (required for private repos)
# OR public_repo - Public repositories only (if no private repos)
# [x] read:org - Read organization membership (required for org backups)
#
# FINE-GRAINED PAT (Settings > Developer settings > Personal access tokens > Fine-grained tokens)
# ─────────────────────────────────────────────────────────────────────────────
# Resource owner: Select your organization or personal account
# Repository access: "All repositories" or select specific repos
#
# Repository permissions (all Read-only):
# [x] Contents - Clone repositories (includes wiki via git)
# [x] Issues - Export issues and comments
# [x] Pull requests - Export pull requests
# [x] Metadata - Basic repository info (automatically included)
#
# All permissions above should be set to "Read-only" - no write access needed.
# No organization permissions required.
#
# ─────────────────────────────────────────────────────────────────────────────
GITHUB_PAT=ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# Include private repositories (requires PAT with 'repo' scope)
# Ignored in unauthenticated mode (no private repos accessible)
GITHUB_BACKUP_PRIVATE=true
# Include forked repositories
GITHUB_BACKUP_FORKS=false
# Include archived repositories
GITHUB_BACKUP_ARCHIVED=true
# Backup ALL repos the user has access to (not just owned by GITHUB_OWNER)
# When true: Backs up owned repos + repos from orgs where user is member + collaborations
# When false (default): Only backs up repos owned by GITHUB_OWNER
# Note: Only applies when GITHUB_OWNER is a user (not organization)
GITHUB_BACKUP_ALL_ACCESSIBLE=false
# ───────────────────────────────────────────────────────────────────────────────
# Backup Configuration
# ───────────────────────────────────────────────────────────────────────────────
# Number of backup copies to retain (older backups will be deleted)
BACKUP_RETENTION_COUNT=10
# Include metadata (issues, pull requests, releases)
BACKUP_INCLUDE_METADATA=true
# Include wiki repositories
BACKUP_INCLUDE_WIKI=true
# Incremental backup: only backup repos that changed since last backup
# Set to false for full backup every time
BACKUP_INCREMENTAL=true
# ───────────────────────────────────────────────────────────────────────────────
# Scheduler Configuration
# ───────────────────────────────────────────────────────────────────────────────
# Enable scheduled backups
BACKUP_SCHEDULE_ENABLED=true
# Schedule mode: cron or interval
# - cron: Run at fixed time (controlled by HOUR, MINUTE, DAY_OF_WEEK)
# - interval: Run every N hours
BACKUP_SCHEDULE_MODE=cron
# Time to run backup (for cron mode)
BACKUP_SCHEDULE_HOUR=2
BACKUP_SCHEDULE_MINUTE=0
# Day of week (for cron mode): 0=Mon, 1=Tue, ..., 6=Sun
# - "*" = every day (daily backup)
# - "0" = Monday only (weekly backup)
# - "0,2,4" = Mon, Wed, Fri
BACKUP_SCHEDULE_DAY_OF_WEEK=*
# Hours between backups (for interval mode, 1-168)
# BACKUP_SCHEDULE_INTERVAL_HOURS=24
# ───────────────────────────────────────────────────────────────────────────────
# S3/MinIO Configuration
# ───────────────────────────────────────────────────────────────────────────────
# S3-compatible endpoint URL
S3_ENDPOINT_URL=https://minio.example.com
# ─────────────────────────────────────────────────────────────────────────────
# MinIO Admin Credentials (TEMPORARY - for setup script only!)
# ─────────────────────────────────────────────────────────────────────────────
# These credentials are ONLY needed to run tools/setup-bucket.py
# After running the setup script, REMOVE these values from your .env file!
# The script creates a dedicated service user with limited permissions.
# Keeping root credentials in .env is a security risk.
#
# MINIO_ROOT_USER=admin
# MINIO_ROOT_PASSWORD=your-minio-root-password
# ─────────────────────────────────────────────────────────────────────────────
# Bucket name for backups
S3_BUCKET=github-backups
# Access credentials
S3_ACCESS_KEY=minioadmin
S3_SECRET_KEY=minioadmin
# Region (required for signature)
S3_REGION=eu-north-1
# Optional prefix/folder in bucket (empty = store directly under {owner}/)
# Example: S3_PREFIX=github-backup -> s3://bucket/github-backup/{owner}/{repo}/{backup_id}/
# Default: S3_PREFIX= -> s3://bucket/{owner}/{repo}/{backup_id}/
S3_PREFIX=
# Multipart upload configuration
# Files larger than threshold use multipart upload with equal-sized chunks
# S3_MULTIPART_THRESHOLD=104857600
# S3_MULTIPART_CHUNK_SIZE=52428800
# ───────────────────────────────────────────────────────────────────────────────
# Alerting Configuration
# ───────────────────────────────────────────────────────────────────────────────
# Enable alerting system
ALERT_ENABLED=false
# Alert level: errors (only failures), warnings (failures + warnings), all (include success)
ALERT_LEVEL=errors
# Active alert channels (comma-separated): email, webhook, teams
ALERT_CHANNELS=
# --- SMTP Email Configuration ---
# SMTP server hostname
SMTP_HOST=
# SMTP server port (587 for TLS/STARTTLS, 465 for SSL)
SMTP_PORT=587
# Use TLS/STARTTLS (recommended for port 587)
SMTP_TLS=true
# Use SSL (for port 465)
SMTP_SSL=false
# SMTP authentication (leave empty for anonymous)
SMTP_USER=
SMTP_PASSWORD=
# Sender email address
SMTP_FROM=
# Sender display name
SMTP_FROM_NAME=GitHub Backup
# Recipients (comma-separated)
SMTP_TO=
# --- Generic Webhook Configuration ---
# Webhook URL for JSON POST alerts
WEBHOOK_URL=
# Optional HMAC secret for signature (X-Signature header)
WEBHOOK_SECRET=
# --- Microsoft Teams Configuration ---
# Teams Webhook URL (from Workflows or legacy Incoming Webhook)
TEAMS_WEBHOOK_URL=
# ───────────────────────────────────────────────────────────────────────────────
# Application Configuration
# ───────────────────────────────────────────────────────────────────────────────
# Timezone (e.g., Europe/Vienna, America/New_York, Etc/UTC)
TZ=Etc/UTC
# Log level (DEBUG, INFO, WARNING, ERROR)
LOG_LEVEL=INFO