Files
dawaric-nginx-ssl/README.md
2026-02-15 12:26:50 +01:00

71 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Dawarich Reverse Proxy
Docker Compose Setup für [Dawarich](https://dawarich.app) mit nginx als Reverse Proxy und Let's Encrypt SSL.
## Voraussetzungen
- Docker und Docker Compose
- Ein auf den Server zeigender Domainname (DNS A-Record)
## Schnellstart
### 1. Konfiguration
Kopiere die Beispiel-Konfiguration und passe sie an:
```bash
cp .env.example .env
```
Bearbeite `.env`:
| Variable | Beschreibung |
|----------|--------------|
| `FQDN` | Vollqualifizierter Domainname (z.B. `location.example.com`) |
| `CERTBOT_EMAIL` | E-Mail für Let's Encrypt (erforderlich für SSL-Zertifikate) |
### 2. Netzwerk erstellen
Das `frontend`-Netzwerk muss extern existieren:
```bash
docker network create frontend
```
### 3. Starten
```bash
docker compose up -d --build
```
Beim ersten Start fordert nginx automatisch ein Let's Encrypt-Zertifikat an. Die Anwendung ist danach unter `https://<FQDN>` erreichbar.
## Komponenten
- **nginx** Reverse Proxy mit HTTPS, gzip-Kompression, WebSocket-Support (ActionCable)
- **dawarich_app** Rails-Anwendung
- **dawarich_sidekiq** Hintergrund-Jobs
- **dawarich_db** PostgreSQL/PostGIS
- **dawarich_redis** Redis
## SSL-Zertifikate
- Automatische Anforderung beim ersten Start (wenn `CERTBOT_EMAIL` gesetzt)
- Automatische Erneuerung alle 12 Stunden
- Zertifikate werden im Volume `certbot_etc` persistiert
## FQDN ändern
Nach Änderung von `FQDN` in `.env`:
```bash
docker compose build nginx --no-cache
docker compose up -d nginx
```
**Hinweis:** Ein neues Let's Encrypt-Zertifikat wird für die neue Domain angefordert.
## Lizenz
MIT siehe [LICENSE](LICENSE).