Infra
This commit is contained in:
@@ -0,0 +1,105 @@
|
||||
# 🌿 GardenPlan – Gartenplanung MVP
|
||||
|
||||
> Symfony-Basises für die Multi-Garten-Planung mit Pflanzen, Aussaat, Ernte & Aufgaben.
|
||||
|
||||
## 🏗️ Architektur
|
||||
|
||||
Strikte Schichtenarchitektur (Clean / Hexagonal):
|
||||
**UI** → **Logic** → **Data**
|
||||
|
||||
Details: [Architektur-Dokumentation](Doku/architektur.md)
|
||||
|
||||
## 📋 Anforderungsprofil
|
||||
|
||||
[Hier ansehen](Doku/anforderungsprofil.md)
|
||||
|
||||
---
|
||||
|
||||
## 🚀 Schnellstart
|
||||
|
||||
### 1. DockerCompose-Setup starten
|
||||
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
Startet folgende Services:
|
||||
| Service | Port | Beschreibung |
|
||||
|---------|------|--------------
|
||||
| **nginx** | `80` / `443` | Webserver für Symfony REST-API
|
||||
| **php-fpm** | (intern) | PHP 8.3 + Symfony Runtime
|
||||
| **PostgreSQL** | `5432` | Datenbank (`gardenplan` + `keycloak_db`)
|
||||
| **Keycloak** | `8080` | OIDC/JWT Identity Provider
|
||||
|
||||
### 🔑 Zugangsdaten (Dev)
|
||||
|
||||
| System | Benutzer | Passwort | URL |
|
||||
|--------|----------|----------|-----|
|
||||
| **Database** | `symfony` | `changeme` | `postgresql://database:5432/gardenplan` |
|
||||
| **Keycloak Admin** | `admin` | `adminsecret` | http://localhost:8080 |
|
||||
| **Test-Nutzer** | `testuser` | `testpassword123!` | (in Keycloak Realm `gardenplan`)
|
||||
|
||||
### 📦 Nach dem ersten Start
|
||||
|
||||
```bash
|
||||
# In den PHP-Container wechseln
|
||||
docker compose exec php-fpm bash
|
||||
|
||||
# Symfony Projekt setup
|
||||
cd /var/www/html
|
||||
composer install
|
||||
|
||||
# Datenbankmigrationen ausführen
|
||||
php bin/console doctrine:database:create
|
||||
php bin/console doctrine:migrations:migrate --no-interaction
|
||||
|
||||
# JWT-Schlüssel für Lexik Bundle generieren
|
||||
php bin/console lexik:jwt:generate-keypair
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 📐 Ordnerstruktur
|
||||
|
||||
```
|
||||
src/
|
||||
├── UI/ # Controller, Commands, MessageHandlers
|
||||
├── Logic/ # UseCases, Manager, Domain Services
|
||||
│ ├── Domain/ # Models, DTOs, Validators, Policies
|
||||
│ └── InfrastructureInterface/ # Provider / Processor Interfaces
|
||||
└── Data/ # Doctrine Entities, Mappers, Implementations
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 📖 Aufgabenplan
|
||||
|
||||
| Task | Beschreibung | Status |
|
||||
|------|-------------|--------|
|
||||
| [01 – Infrastruktur](Doku/Tasks/01-Infra.md) | Docker, DB, Keycloak Setup | ✅ In Arbeit |
|
||||
| 02 – Datenbank-Schema | Entities + Migrationen | ⏳ Offen |
|
||||
| 03 – Planning-Domain | GardenPlan Model, UseCases | ⏳ Offen |
|
||||
| 04 – REST API | Controller + DTOs | ⏳ Offen |
|
||||
| 05 – Auth & RBAC Keycloak Integration | ⏳ Offen |
|
||||
|
||||
---
|
||||
|
||||
## 🔧 Entwicklung
|
||||
|
||||
```bash
|
||||
# Logs einsehen
|
||||
docker compose logs -f php-fpm
|
||||
docker compose logs -f nginx
|
||||
|
||||
# Container neu starten
|
||||
docker compose restart php-fpm
|
||||
|
||||
# Alles stoppen
|
||||
docker compose down
|
||||
```
|
||||
|
||||
## .env-Variabeln kopieren & anpassen. Siehe `.env`.
|
||||
|
||||
---
|
||||
|
||||
**🌱 Happy Gardening!**
|
||||
|
||||
Reference in New Issue
Block a user