Files
michaelschiemer/docs/DEPLOYMENT.md

44 lines
822 B
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 🚀 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