52 lines
1.5 KiB
Markdown
52 lines
1.5 KiB
Markdown
# Website-Projekt (automatischer Deploy)
|
|
|
|
Dieses Projekt ist eine Vorlage für statische Webseiten, die automatisch bei jedem Push auf den `main`-Branch auf Fly.io deployed wird.
|
|
|
|
## Voraussetzungen
|
|
|
|
1. Fly.io App wurde erstellt
|
|
2. `fly.toml` enthält den richtigen Appnamen (`app = "dein-app-name"`)
|
|
3. Im Repository wurde das Woodpecker-Secret `fly_api_token` gesetzt
|
|
|
|
## Ordnerstruktur
|
|
|
|
```
|
|
/ (Root des Repos)
|
|
├── .woodpecker.yml → CI/CD Pipeline für Woodpecker
|
|
├── fly.toml → Konfiguration für Fly.io Deployment
|
|
├── Dockerfile → Webserver-Build mit Nginx
|
|
├── README.md → Anleitung für Mitarbeitende
|
|
├── .gitignore → Ignoriert z. B. .obsidian und Logs
|
|
└── (deine Website-Dateien: HTML, CSS, JS)
|
|
```
|
|
|
|
## Deployment-Ablauf
|
|
|
|
1. Du bearbeitest deine Seite (HTML, CSS, JS etc.)
|
|
2. Du machst `git commit` und `git push` auf den `main`-Branch
|
|
3. Woodpecker startet automatisch den Deploy zu Fly.io
|
|
4. Die Seite ist öffentlich erreichbar (z. B. via Cloudflare)
|
|
|
|
## HTTPS & Domains
|
|
|
|
- Domains werden über Cloudflare verwaltet
|
|
- Leite deine Domain in Cloudflare auf deine Fly.io-App
|
|
- Stelle in Cloudflare SSL auf "Full (Strict)"
|
|
|
|
## Häufige Aufgaben
|
|
|
|
**Appnamen anpassen in `fly.toml`:**
|
|
|
|
```toml
|
|
app = "dein-app-name"
|
|
```
|
|
|
|
**Secret hinzufügen in Woodpecker:**
|
|
|
|
- Name: `fly_api_token`
|
|
- Wert: Dein Fly.io API Token (https://fly.io/user/personal_access_tokens)
|
|
|
|
## Hilfe
|
|
|
|
Wenn du Fragen hast, wende dich an den Administrator oder schau auf https://fly.io/docs
|