docs: add initial docs for commits, deployment, env variables and setup

This commit is contained in:
2025-05-18 17:14:15 +02:00
parent 31c5857435
commit 9e76382fa8
4 changed files with 207 additions and 0 deletions

43
docs/DEPLOYMENT.md Normal file
View File

@@ -0,0 +1,43 @@
# 🚀 Deployment-Anleitung (Ansible-basiert)
Dieses Projekt verwendet Ansible zur automatisierten Bereitstellung.
---
## 🧱 Struktur
- `ansible/setup.yml` → Bereitet Zielserver vor (Docker, Git, Benutzer)
- `ansible/deploy.yml` → Clont Projekt & startet Docker Compose
---
## 📂 Vorbereitung
1. Zielserver (Debian)
2. SSH-Zugang (z.B. via `~/.ssh/id_rsa`)
3. Eintrag in `ansible/inventory.ini`:
```ini
[web]
123.123.123.123 ansible_user=root
```
---
## ▶️ Ausführen
```bash
# Setup ausführen (nur einmal)
ansible-playbook -i ansible/inventory.ini ansible/setup.yml
# Projekt deployen (beliebig oft)
ansible-playbook -i ansible/inventory.ini ansible/deploy.yml
```
---
## 🔐 Hinweis
- `.env` wird **nicht** automatisch übertragen
- Serverpfade ggf. per `dest:` in `git:`-Modul anpassen