Skip to content

Commit 948250d

Browse files
committed
Updated some interfaces to be more future proof
1 parent beedbaf commit 948250d

File tree

15 files changed

+10156
-19
lines changed

15 files changed

+10156
-19
lines changed

.env.example

Lines changed: 35 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,40 @@
1-
# Docker Registry Configuration
2-
DOCKER_REGISTRY=ghcr.io
3-
DOCKER_IMAGE=arunavo4/gitea-mirror
4-
DOCKER_TAG=latest
1+
# Gitea Mirror Configuration
2+
# Copy this to .env and update with your values
3+
4+
# ===========================================
5+
# CORE CONFIGURATION
6+
# ===========================================
57

68
# Application Configuration
79
NODE_ENV=production
810
HOST=0.0.0.0
911
PORT=4321
12+
13+
# Database Configuration
14+
# For self-hosted, SQLite is used by default
1015
DATABASE_URL=sqlite://data/gitea-mirror.db
1116

1217
# Security
18+
# Generate with: openssl rand -base64 32
1319
BETTER_AUTH_SECRET=change-this-to-a-secure-random-string-in-production
1420
BETTER_AUTH_URL=http://localhost:4321
1521
# ENCRYPTION_SECRET=optional-encryption-key-for-token-encryption # Generate with: openssl rand -base64 48
1622

17-
# Optional GitHub/Gitea Mirror Configuration (for docker-compose, can also be set via web UI)
18-
# Uncomment and set as needed. These are passed as environment variables to the container.
23+
# ===========================================
24+
# DOCKER CONFIGURATION (Optional)
25+
# ===========================================
26+
27+
# Docker Registry Configuration
28+
DOCKER_REGISTRY=ghcr.io
29+
DOCKER_IMAGE=arunavo4/gitea-mirror
30+
DOCKER_TAG=latest
31+
32+
# ===========================================
33+
# MIRROR CONFIGURATION (Optional)
34+
# Can also be configured via web UI
35+
# ===========================================
36+
37+
# GitHub Configuration
1938
# GITHUB_USERNAME=your-github-username
2039
# GITHUB_TOKEN=your-github-personal-access-token
2140
# SKIP_FORKS=false
@@ -27,22 +46,23 @@ BETTER_AUTH_URL=http://localhost:4321
2746
# PRESERVE_ORG_STRUCTURE=false
2847
# ONLY_MIRROR_ORGS=false
2948
# SKIP_STARRED_ISSUES=false
49+
50+
# Gitea Configuration
3051
# GITEA_URL=http://gitea:3000
3152
# GITEA_TOKEN=your-local-gitea-token
3253
# GITEA_USERNAME=your-local-gitea-username
3354
# GITEA_ORGANIZATION=github-mirrors
3455
# GITEA_ORG_VISIBILITY=public
3556
# DELAY=3600
3657

37-
# Optional Database Cleanup Configuration (configured via web UI)
38-
# These environment variables are optional and only used as defaults
39-
# Users can configure cleanup settings through the web interface
58+
# ===========================================
59+
# OPTIONAL FEATURES
60+
# ===========================================
61+
62+
# Database Cleanup Configuration
4063
# CLEANUP_ENABLED=false
4164
# CLEANUP_RETENTION_DAYS=7
4265

43-
# Optional TLS/SSL Configuration
44-
# Option 1: Mount custom CA certificates in ./certs directory as .crt files
45-
# The container will automatically combine them into a CA bundle
46-
# Option 2: Mount your system CA bundle at /etc/ssl/certs/ca-certificates.crt
47-
# See docker-compose.yml for volume mount examples
48-
# GITEA_SKIP_TLS_VERIFY=false # WARNING: Only use for testing, disables TLS verification
66+
# TLS/SSL Configuration
67+
# GITEA_SKIP_TLS_VERIFY=false # WARNING: Only use for testing
68+

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,3 @@ certs/*.pem
3232
certs/*.cer
3333
!certs/README.md
3434

35-
# Hosted version documentation (local only)
36-
docs/HOSTED_VERSION.md

docs/SPONSOR_INTEGRATION.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# GitHub Sponsors Integration
2+
3+
This guide shows how GitHub Sponsors is integrated into the open-source version of Gitea Mirror.
4+
5+
## Components
6+
7+
### GitHubSponsors Card
8+
9+
A card component that displays in the sidebar or dashboard:
10+
11+
```tsx
12+
import { GitHubSponsors } from '@/components/sponsors/GitHubSponsors';
13+
14+
// In your layout or dashboard
15+
<GitHubSponsors />
16+
```
17+
18+
### SponsorButton
19+
20+
A smaller button for headers or navigation:
21+
22+
```tsx
23+
import { SponsorButton } from '@/components/sponsors/GitHubSponsors';
24+
25+
// In your header
26+
<SponsorButton />
27+
```
28+
29+
## Integration Points
30+
31+
### 1. Dashboard Sidebar
32+
33+
Add the sponsor card to the dashboard sidebar for visibility:
34+
35+
```tsx
36+
// src/components/layout/DashboardLayout.tsx
37+
<aside>
38+
{/* Other sidebar content */}
39+
<GitHubSponsors />
40+
</aside>
41+
```
42+
43+
### 2. Header Navigation
44+
45+
Add the sponsor button to the main navigation:
46+
47+
```tsx
48+
// src/components/layout/Header.tsx
49+
<nav>
50+
{/* Other nav items */}
51+
<SponsorButton />
52+
</nav>
53+
```
54+
55+
### 3. Settings Page
56+
57+
Add a support section in settings:
58+
59+
```tsx
60+
// src/components/settings/SupportSection.tsx
61+
<Card>
62+
<CardHeader>
63+
<CardTitle>Support Development</CardTitle>
64+
</CardHeader>
65+
<CardContent>
66+
<GitHubSponsors />
67+
</CardContent>
68+
</Card>
69+
```
70+
71+
## Behavior
72+
73+
- **Only appears in self-hosted mode**: The components automatically hide in hosted mode
74+
- **Non-intrusive**: Designed to be helpful without being annoying
75+
- **Multiple options**: GitHub Sponsors, Buy Me a Coffee, and starring the repo
76+
77+
## Customization
78+
79+
You can customize the sponsor components by:
80+
81+
1. Updating the GitHub Sponsors URL
82+
2. Adding/removing donation platforms
83+
3. Changing the styling to match your theme
84+
4. Adjusting the placement based on user feedback
85+
86+
## Best Practices
87+
88+
1. **Don't be pushy**: Show sponsor options tastefully
89+
2. **Provide value first**: Ensure the tool is useful before asking for support
90+
3. **Be transparent**: Explain how sponsorships help the project
91+
4. **Thank sponsors**: Acknowledge supporters in README or releases

0 commit comments

Comments
 (0)