Fix Gitea Actions compatibility and improve container configuration
Some checks failed
Some checks failed
- Update all GitHub Actions to v3 for Gitea compatibility - Fix artifact upload/download actions (v4 -> v3) - Remove GitHub-specific features (GITHUB_STEP_SUMMARY) - Add complete Docker Compose configuration with PostgreSQL and Redis - Add environment secrets support for all workflows - Add debug workflow for secrets verification - Add comprehensive documentation for secrets setup - Improve container networking and health checks
This commit is contained in:
105
SECRETS-VERIFICATION.md
Normal file
105
SECRETS-VERIFICATION.md
Normal file
@@ -0,0 +1,105 @@
|
||||
# Secrets Verification Guide
|
||||
|
||||
## Wie du überprüfst, ob Secrets korrekt geladen werden
|
||||
|
||||
### 1. **Debug-Workflow ausführen**
|
||||
|
||||
Ich habe einen speziellen Debug-Workflow erstellt (`.gitea/workflows/debug-secrets.yml`):
|
||||
|
||||
1. Gehe zu deinem Repository in Gitea
|
||||
2. Klicke auf **Actions** → **Debug Secrets**
|
||||
3. Klicke auf **Run workflow** → **Run workflow**
|
||||
4. Der Workflow wird dir zeigen:
|
||||
- ✅ Welche Secrets gesetzt sind
|
||||
- ❌ Welche Secrets fehlen
|
||||
- 🔐 Ob die Formate korrekt sind
|
||||
|
||||
### 2. **Secrets in Gitea überprüfen**
|
||||
|
||||
**Manuell in Gitea:**
|
||||
1. Gehe zu **Settings** → **Secrets**
|
||||
2. Überprüfe, ob alle Secrets vorhanden sind:
|
||||
- `NEXT_PUBLIC_BASE_URL`
|
||||
- `MY_EMAIL`
|
||||
- `MY_INFO_EMAIL`
|
||||
- `MY_PASSWORD`
|
||||
- `MY_INFO_PASSWORD`
|
||||
- `ADMIN_BASIC_AUTH`
|
||||
|
||||
### 3. **Workflow-Logs überprüfen**
|
||||
|
||||
Nach dem Ausführen eines Workflows:
|
||||
|
||||
1. Gehe zu **Actions** → **Workflow runs**
|
||||
2. Klicke auf den neuesten Run
|
||||
3. Schaue dir die Logs an, besonders:
|
||||
- "Verify secrets before deployment"
|
||||
- "Verify container environment"
|
||||
|
||||
### 4. **Container direkt überprüfen**
|
||||
|
||||
Falls der Container läuft, kannst du ihn direkt überprüfen:
|
||||
|
||||
```bash
|
||||
# Container-Environment anzeigen
|
||||
docker exec portfolio-app env | grep -E "(NEXT_PUBLIC_BASE_URL|MY_EMAIL|ADMIN_BASIC_AUTH)"
|
||||
|
||||
# Container-Logs anzeigen
|
||||
docker logs portfolio-app
|
||||
|
||||
# Services-Status prüfen
|
||||
docker-compose -f docker-compose.workflow.yml ps
|
||||
```
|
||||
|
||||
### 5. **Häufige Probleme**
|
||||
|
||||
**❌ Secret nicht gesetzt:**
|
||||
- Gehe zu Gitea → Settings → Secrets
|
||||
- Füge das fehlende Secret hinzu
|
||||
|
||||
**❌ Falsches Format:**
|
||||
- `NEXT_PUBLIC_BASE_URL`: Muss mit `http://` oder `https://` beginnen
|
||||
- `MY_EMAIL`: Muss eine gültige Email-Adresse sein
|
||||
- `ADMIN_BASIC_AUTH`: Muss Format `username:password` haben
|
||||
|
||||
**❌ Container kann nicht starten:**
|
||||
- Überprüfe die Docker-Logs
|
||||
- Stelle sicher, dass alle Services (PostgreSQL, Redis) laufen
|
||||
|
||||
### 6. **Test-Schritte**
|
||||
|
||||
1. **Führe den Debug-Workflow aus**
|
||||
2. **Überprüfe die Ausgabe**
|
||||
3. **Korrigiere fehlende/falsche Secrets**
|
||||
4. **Führe einen normalen Workflow aus**
|
||||
5. **Überprüfe die Container-Environment**
|
||||
|
||||
### 7. **Erwartete Ausgabe**
|
||||
|
||||
**Bei korrekten Secrets:**
|
||||
```
|
||||
✅ NEXT_PUBLIC_BASE_URL: Set (length: 15)
|
||||
✅ MY_EMAIL: Set (length: 20)
|
||||
✅ MY_INFO_EMAIL: Set (length: 18)
|
||||
✅ MY_PASSWORD: Set (length: 12)
|
||||
✅ MY_INFO_PASSWORD: Set (length: 12)
|
||||
✅ ADMIN_BASIC_AUTH: Set (length: 15)
|
||||
```
|
||||
|
||||
**Bei fehlenden Secrets:**
|
||||
```
|
||||
❌ NEXT_PUBLIC_BASE_URL: Not set
|
||||
❌ MY_EMAIL: Not set
|
||||
```
|
||||
|
||||
### 8. **Schnelltest**
|
||||
|
||||
Führe diesen Befehl aus, um schnell zu testen:
|
||||
|
||||
```bash
|
||||
# Debug-Workflow manuell ausführen
|
||||
curl -X POST "https://your-gitea-instance.com/api/v1/repos/your-username/portfolio/actions/workflows/debug-secrets.yml/dispatches" \
|
||||
-H "Authorization: token YOUR_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"ref":"main"}'
|
||||
```
|
||||
Reference in New Issue
Block a user