chore: initial commit for Bruchtal Docker + deploy
This commit is contained in:
66
docs/workflows/docker-workflow.md
Normal file
66
docs/workflows/docker-workflow.md
Normal file
@@ -0,0 +1,66 @@
|
||||
# Docker-Workflow (Bruchtal Standard)
|
||||
|
||||
Dieser Workflow ist verbindlich für alle Änderungen an Docker-Stacks in Bruchtal.
|
||||
|
||||
Ziel:
|
||||
- Keine Konfiguration direkt auf der VM
|
||||
- Alles versioniert in Git
|
||||
- Reproduzierbare Deployments
|
||||
- Dokumentation immer synchron zur Infrastruktur
|
||||
|
||||
---
|
||||
|
||||
## Grundprinzip
|
||||
|
||||
**Konfiguration passiert lokal in VS Code.**
|
||||
Die VM ist nur noch Laufzeitumgebung.
|
||||
|
||||
|
||||
1. Lokal ändern, egal was
|
||||
2. Committen & Pushen
|
||||
3. Auf VM pullen
|
||||
4. Container neu starten
|
||||
|
||||
---
|
||||
|
||||
## Workflow "neuer Container"
|
||||
- VSCode starten in ~Bruchtal mit code . => VS startet sauber mit der Giteinstellung
|
||||
**ALLE ÄNDERUNGEN NUR IN VS**
|
||||
|
||||
### neuen Containeranlegen
|
||||
- `Bruchtal/<Containername>` anlegen
|
||||
- `Bruchtal/<Containername>/docker-compose.yml` anlegen
|
||||
- docker-compose.yml editieren,
|
||||
- commit mit Message `"infra(<Containername>): docker-compose.yml neu angelegt"`
|
||||
- push
|
||||
|
||||
|
||||
### neuen Container dokumentieren
|
||||
- `Bruchtal/docs/<Containername>` anlegen
|
||||
- `Bruchtal/docs/<Containername>/<Containername>.md` anlegen
|
||||
- `<Containername>.md` editieren, Blaupause z.B: wikijs.md
|
||||
- commit message `docs(<Containername>): Dokumentation angelegt`
|
||||
- `Bruchtal/mkdocs.md`: nav sinnvoll ergänzen
|
||||
- commit message `docs(mkdocs): <Containername>` ergänzt
|
||||
- push
|
||||
|
||||
### Übernehmen auf VM Docker
|
||||
```bash
|
||||
ssh docker
|
||||
cd /docker/Bruchtal
|
||||
git pull
|
||||
cd /docker/Bruchtal/<Containername>
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
## Repository-Struktur
|
||||
```
|
||||
Bruchtal/
|
||||
├── docker/
|
||||
│ └── <Containername>/
|
||||
│ └── docker-compose.yml
|
||||
└── docs/
|
||||
└── docker/
|
||||
└── <Containername>/
|
||||
└── <Containername>.md
|
||||
```
|
||||
Reference in New Issue
Block a user