prod version

This commit is contained in:
2026-03-10 11:06:14 +01:00
commit a61351a210
9 changed files with 376 additions and 0 deletions

108
README.md Normal file
View File

@@ -0,0 +1,108 @@
# NetBird + Traefik + Prometheus — Deployment Stack
Ten projekt zawiera gotowy zestaw konfiguracji Docker Compose do uruchomienia:
* **NetBird** prywatna sieć mesh / VPN
* **Traefik** reverse proxy + SSL (Let's Encrypt)
* **Prometheus** monitoring
Repozytorium zawiera przykładowe pliki konfiguracyjne `.example`, które należy skopiować i dostosować przed uruchomieniem infrastruktury.
***
## 📁 Struktura repozytorium
|-- README.md
|-- compose.yaml
|-- netbird
| |-- configs
| | |-- config.yaml.example
| | `-- dashboard.env.example
| `-- data
|-- prometheus
| `-- prometheus.yml
`-- traefik
|-- acme
|-- dynamic
| `-- dynamic.yml
|-- traefik.env.example
`-- traefik.yml
***
## 🚀 Przygotowanie środowiska
### 1. Skopiuj pliki konfiguracyjne
Usuń rozszerzenie `.example`:
```bash
cp netbird/configs/config.yaml.example netbird/configs/config.yaml
cp netbird/configs/dashboard.env.example netbird/configs/dashboard.env
cp traefik/traefik.env.example traefik/traefik.env
```
***
## ✏️ Edycja konfiguracji
### 2. Zamień domenę
W plikach:
* `netbird/configs/config.yaml`
* `netbird/configs/dashboard.env`
* `traefik/traefik.env`
Zamień:
vpn.example.com
na **swoją domenę**, np.:
vpn.twojadomena.pl
***
### 3. Wygeneruj klucze cryptograficzne dla NetBird
W pliku:
`netbird/configs/config.yaml`
Wypełnij:
```yaml
authSecret: "<wygenerowany_secret>"
encryptionKey: "<wygenerowany_klucz>"
```
Użyj generatorów:
```bash
openssl rand -base64 33
```
```bash
openssl rand -base64 32
```
***
## ▶️ Uruchomienie
Po przygotowaniu wszystkich plików:
```bash
docker compose up -d
```
***
## 📌 Dodatkowe informacje
* Katalog `traefik/acme/` zostanie automatycznie wypełniony certyfikatami Lets Encrypt.
* Katalog `netbird/data/` przechowuje dane NetBird Controller / Management.
* Traefik ładuje reguły dynamiczne z `traefik/dynamic/dynamic.yml`.