fix: DockerSecretsResolver - don't normalize absolute paths like /var/www/html/...
Some checks failed
Deploy Application / deploy (push) Has been cancelled
Some checks failed
Deploy Application / deploy (push) Has been cancelled
This commit is contained in:
122
deployment/infrastructure/README.md
Normal file
122
deployment/infrastructure/README.md
Normal file
@@ -0,0 +1,122 @@
|
||||
# Infrastructure Layer
|
||||
|
||||
Dieses Verzeichnis enthält die Infrastruktur-Stacks, die dauerhaft laufen und unabhängig von Application-Deployments sind.
|
||||
|
||||
## Übersicht
|
||||
|
||||
Die Infrastruktur besteht aus drei Core-Komponenten:
|
||||
|
||||
1. **Traefik** - Reverse Proxy mit SSL-Zertifikaten
|
||||
2. **Gitea** - Git Server mit eigener PostgreSQL-Instanz
|
||||
3. **PostgreSQL** - Shared Database für Application-Stacks
|
||||
|
||||
## Verzeichnisstruktur
|
||||
|
||||
```
|
||||
infrastructure/
|
||||
├── traefik/ # Reverse Proxy & SSL
|
||||
│ ├── docker-compose.yml
|
||||
│ ├── secrets/
|
||||
│ └── README.md
|
||||
├── gitea/ # Git Server
|
||||
│ ├── docker-compose.yml
|
||||
│ ├── secrets/
|
||||
│ └── README.md
|
||||
├── postgresql/ # Shared Database
|
||||
│ ├── docker-compose.yml
|
||||
│ ├── secrets/
|
||||
│ └── README.md
|
||||
└── README.md (dieses Dokument)
|
||||
```
|
||||
|
||||
## Deployment-Reihenfolge
|
||||
|
||||
**Wichtig:** Die Stacks müssen in dieser Reihenfolge deployt werden:
|
||||
|
||||
1. **Traefik** (muss zuerst laufen)
|
||||
2. **PostgreSQL** (wird von Application benötigt)
|
||||
3. **Gitea** (nutzt Traefik für SSL)
|
||||
|
||||
## Quick Start
|
||||
|
||||
### Initial Setup
|
||||
|
||||
```bash
|
||||
# 1. Traefik deployen
|
||||
cd traefik
|
||||
docker compose up -d
|
||||
|
||||
# 2. PostgreSQL deployen
|
||||
cd ../postgresql
|
||||
docker compose up -d
|
||||
|
||||
# 3. Gitea deployen
|
||||
cd ../gitea
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
### Updates
|
||||
|
||||
```bash
|
||||
# Einzelnen Stack updaten
|
||||
cd <stack-name>
|
||||
docker compose pull
|
||||
docker compose up -d
|
||||
|
||||
# Alle Stacks updaten
|
||||
./deploy.sh all
|
||||
```
|
||||
|
||||
## Networks
|
||||
|
||||
Die Infrastruktur verwendet folgende Networks:
|
||||
|
||||
- **traefik-public** - Wird von Traefik erstellt, für externe Zugriffe
|
||||
- **infrastructure** - Für interne Infrastruktur-Kommunikation (Gitea ↔ PostgreSQL)
|
||||
- **app-internal** - Wird von PostgreSQL erstellt, für Application-Zugriff
|
||||
|
||||
## Secrets
|
||||
|
||||
Secrets werden in `secrets/` Verzeichnissen pro Stack gespeichert:
|
||||
|
||||
- `traefik/secrets/acme_email.txt` - Let's Encrypt E-Mail
|
||||
- `gitea/secrets/postgres_password.txt` - Gitea PostgreSQL Passwort
|
||||
- `postgresql/secrets/postgres_password.txt` - Application PostgreSQL Passwort
|
||||
|
||||
**Wichtig:** Secrets-Dateien sind gitignored und müssen manuell erstellt werden.
|
||||
|
||||
Siehe `SECRETS.md` für Details zur Secrets-Generierung.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Traefik nicht erreichbar
|
||||
|
||||
```bash
|
||||
cd traefik
|
||||
docker compose logs -f
|
||||
docker compose ps
|
||||
```
|
||||
|
||||
### PostgreSQL-Verbindungsprobleme
|
||||
|
||||
```bash
|
||||
cd postgresql
|
||||
docker compose logs postgres
|
||||
docker network inspect app-internal
|
||||
```
|
||||
|
||||
### Gitea nicht erreichbar
|
||||
|
||||
```bash
|
||||
cd gitea
|
||||
docker compose logs -f gitea
|
||||
docker compose ps
|
||||
```
|
||||
|
||||
## Weitere Dokumentation
|
||||
|
||||
- [Traefik Stack](traefik/README.md)
|
||||
- [Gitea Stack](gitea/README.md)
|
||||
- [PostgreSQL Stack](postgresql/README.md)
|
||||
- [Secrets Management](SECRETS.md)
|
||||
|
||||
Reference in New Issue
Block a user