Integriere Docusaurus in Haupt-Compose mit TLS unter /docs

This commit is contained in:
2026-04-22 14:48:11 +02:00
parent 9fea18b215
commit 30dc99e4e0
5 changed files with 49 additions and 38 deletions

View File

@@ -2,6 +2,12 @@
Diese Docusaurus-App rendert die versionierte FEDEO-Dokumentation aus dem Ordner `../docs`.
## Zielpfad in Produktion
Die Seite ist für den Betrieb hinter Traefik unter folgendem Pfad konfiguriert:
- `https://app.fedeo.de/docs`
## Lokale Entwicklung
Im Ordner `docs-site` ausführen:
@@ -20,15 +26,23 @@ npm run build
npm run serve
```
## Deploy mit Docker Compose
## Deploy über Haupt-Compose
Aus dem Projekt-Root:
Die Docs sind in der zentralen `docker-compose.yml` als eigener Service `docs` eingebunden.
Deploy aus dem Projekt-Root:
```bash
docker compose -f docker-compose.docs.yml up -d --build
docker compose pull docs
docker compose up -d docs
```
Standard-Port ist `3205`.
Für ein komplettes Update des gesamten Stacks:
```bash
docker compose pull
docker compose up -d
```
## Workflow bei Funktionsänderungen
@@ -41,11 +55,5 @@ node docs/scripts/sync-funktionsdoku.mjs
```
2. Änderungen committen
3. Docs-Container neu bauen und starten
## Wichtige Platzhalter
Bitte in `docs-site/docusaurus.config.ts` anpassen:
- `url` auf die echte Docs-Domain
- GitHub-Links (`editUrl`, `Repository`)
3. CI baut und pusht das `docs`-Image
4. Server zieht neues Image und startet den Service neu

View File

@@ -5,8 +5,8 @@ const config: Config = {
title: 'FEDEO Docs',
tagline: 'Versionierte Funktionsdokumentation für FEDEO',
url: 'https://docs.example.com',
baseUrl: '/',
url: 'https://app.fedeo.de',
baseUrl: '/docs/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
@@ -22,7 +22,7 @@ const config: Config = {
{
docs: {
path: '../docs',
routeBasePath: 'docs',
routeBasePath: '/',
sidebarPath: './sidebars.ts',
editUrl: 'https://github.com/DEIN-ORG/DEIN-REPO/tree/main/',
},
@@ -59,7 +59,7 @@ const config: Config = {
items: [
{
label: 'Funktionsübersicht',
to: '/docs/funktionen/uebersicht',
to: '/funktionen/uebersicht',
},
],
},

View File

@@ -6,7 +6,7 @@ server {
index index.html;
location / {
try_files $uri $uri/ /index.html;
try_files $uri $uri/ /docs/index.html;
}
location ~* \.(?:css|js|map|jpg|jpeg|gif|png|svg|ico|webp|woff2?)$ {

View File

@@ -1,20 +0,0 @@
import Link from '@docusaurus/Link';
import Layout from '@theme/Layout';
export default function Home(): JSX.Element {
return (
<Layout title="FEDEO Docs" description="Versionierte Funktionsdokumentation für FEDEO">
<main className="heroSection">
<div className="container">
<h1>FEDEO Dokumentation</h1>
<p>Versionierte Anleitung aller Funktionen für Backend, Web und Mobile.</p>
<div className="heroButtons">
<Link className="button button--primary button--lg" to="/docs/funktionen">
Zur Dokumentation
</Link>
</div>
</div>
</main>
</Layout>
);
}