refactor: Build-Output in Build/{OS}/-Ordnerstruktur
Plattformspezifische bin/obj/publish-Ordner unter Build/Linux/
und Build/Windows/ statt bin-linux/, obj-linux/, publish/ etc.
- Directory.Build.props: OS-Erkennung setzt BaseOutputPath,
BaseIntermediateOutputPath und MSBuildProjectExtensionsPath
auf Build/{Linux|Windows|macOS}/
- gott.csproj: Vereinfacht auf ein einziges Build/** Exclude
- deploy.sh: publish-Output nach Build/Linux/publish
- OpenClawEndpoint.cs: DB-Pfad relativ zu AppContext.BaseDirectory
- Doku (README, ARCHITECTURE, ARCHITECTURE_QUICK) aktualisiert
This commit is contained in:
1 parent
809e59d540
commit
b40a872c29
8 files changed
+59
-48
No files matched your search
+2
-3
@@ -1,8 +1,7 @@
|
|||||||
|
Build/
|
||||||
bin/
|
bin/
|
||||||
data/
|
|
||||||
obj/
|
obj/
|
||||||
publish/
|
data/
|
||||||
publish-win/
|
|
||||||
Temp/
|
Temp/
|
||||||
appsettings.Production.json
|
appsettings.Production.json
|
||||||
DEVY.md
|
DEVY.md
|
||||||
+11
-7
@@ -235,7 +235,11 @@ gott/
|
|||||||
│ ├── MainWindow.xaml/cs # WebView2 Host Window
|
│ ├── MainWindow.xaml/cs # WebView2 Host Window
|
||||||
│ └── appsettings.json # Server-URL Konfiguration
|
│ └── appsettings.json # Server-URL Konfiguration
|
||||||
│
|
│
|
||||||
└── publish/ # Build-Output (NICHT editieren!)
|
└── Build/ # Build-Output (NICHT editieren!)
|
||||||
|
├── Linux/
|
||||||
|
│ ├── bin/ obj/ publish/
|
||||||
|
└── Windows/
|
||||||
|
├── bin/ obj/ publish/
|
||||||
└── data/
|
└── data/
|
||||||
├── gott.db # SQLite Datenbank
|
├── gott.db # SQLite Datenbank
|
||||||
├── agents/ # Agent Memory-Dateien
|
├── agents/ # Agent Memory-Dateien
|
||||||
@@ -1527,7 +1531,7 @@ Im `WindowsApp/`-Ordner liegt ein minimaler **WPF WebView2 Client**:
|
|||||||
|
|
||||||
## OpenClaw Import
|
## OpenClaw Import
|
||||||
|
|
||||||
Sessions können mit Chatverlauf aus einer **OpenClaw-Instanz** befüllt werden. Die Import-Quelle ist eine SQLite-Datenbank (`publish/data/openclaw-sessions.db`).
|
Sessions können mit Chatverlauf aus einer **OpenClaw-Instanz** befüllt werden. Die Import-Quelle ist eine SQLite-Datenbank (`Build/<OS>/publish/data/openclaw-sessions.db`).
|
||||||
|
|
||||||
### Funktionsweise
|
### Funktionsweise
|
||||||
|
|
||||||
@@ -1570,7 +1574,7 @@ set -e
|
|||||||
cd /app/gott
|
cd /app/gott
|
||||||
export PATH="$HOME/.dotnet:$PATH"
|
export PATH="$HOME/.dotnet:$PATH"
|
||||||
systemctl stop gott
|
systemctl stop gott
|
||||||
dotnet publish -c Release -o publish
|
dotnet publish -c Release -o Build/Linux/publish
|
||||||
systemctl start gott
|
systemctl start gott
|
||||||
echo "OK"
|
echo "OK"
|
||||||
```
|
```
|
||||||
@@ -1578,9 +1582,9 @@ echo "OK"
|
|||||||
### Verzeichnisse
|
### Verzeichnisse
|
||||||
|
|
||||||
- **Quell-Code**: `/app/gott/` (wwwroot/, Services/, etc.)
|
- **Quell-Code**: `/app/gott/` (wwwroot/, Services/, etc.)
|
||||||
- **Build-Output**: `/app/gott/publish/`
|
- **Build-Output**: `/app/gott/Build/<OS>/publish/`
|
||||||
- **Laufzeit-Daten**: `/app/gott/publish/data/` (DB, Agents, Images, Skills)
|
- **Laufzeit-Daten**: `/app/gott/Build/<OS>/publish/data/` (DB, Agents, Images, Skills)
|
||||||
- **WICHTIG**: Änderungen IMMER in `wwwroot/` machen, NIEMALS in `publish/wwwroot/`
|
- **WICHTIG**: Änderungen IMMER in `wwwroot/` machen, NIEMALS in `Build/*/publish/wwwroot/`
|
||||||
|
|
||||||
### systemd
|
### systemd
|
||||||
|
|
||||||
@@ -1606,7 +1610,7 @@ Die Anwendung läuft als systemd Service (`gott.service`), Kestrel auf Port 1900
|
|||||||
|
|
||||||
### appsettings.Production.json
|
### appsettings.Production.json
|
||||||
|
|
||||||
Überschreibt Werte aus `appsettings.json` im Production-Environment. Wird **nicht** beim Publish mitkopiert (liegt nur im `publish/`-Verzeichnis). Verwaltung über die **Admin-UI** (Servereinstellungen, `#/server-settings`).
|
Überschreibt Werte aus `appsettings.json` im Production-Environment. Wird **nicht** beim Publish mitkopiert (liegt nur im `Build/<OS>/publish/`-Verzeichnis). Verwaltung über die **Admin-UI** (Servereinstellungen, `#/server-settings`).
|
||||||
|
|
||||||
### Environment
|
### Environment
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,11 @@ gott/
|
|||||||
│ ├── js/pages/ # Seiten-Komponenten (inkl. telegram-bot-page.js)
|
│ ├── js/pages/ # Seiten-Komponenten (inkl. telegram-bot-page.js)
|
||||||
│ └── css/ # Styles (theme.css = CSS Variables)
|
│ └── css/ # Styles (theme.css = CSS Variables)
|
||||||
├── WindowsApp/ # WPF + WebView2 Desktop Client
|
├── WindowsApp/ # WPF + WebView2 Desktop Client
|
||||||
└── publish/ # ⛔ NICHT editieren!
|
└── Build/ # ⛔ NICHT editieren!
|
||||||
|
├── Linux/
|
||||||
|
│ ├── bin/ obj/ publish/
|
||||||
|
└── Windows/
|
||||||
|
├── bin/ obj/ publish/
|
||||||
└── data/
|
└── data/
|
||||||
├── gott.db # SQLite DB
|
├── gott.db # SQLite DB
|
||||||
├── agents/{id}/ # Memory-Dateien pro Agent
|
├── agents/{id}/ # Memory-Dateien pro Agent
|
||||||
@@ -252,7 +256,7 @@ User-Input → POST /api/chat (SSE)
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Verwaltung über **Admin-UI** (`#/server-settings`): Liest `appsettings.Production.json` (Fallback: `appsettings.json` → Default). Schreibt immer in `appsettings.Production.json`. Die Datei wird **nicht** beim Publish mitkopiert.
|
Verwaltung über **Admin-UI** (`#/server-settings`): Liest `appsettings.Production.json` (Fallback: `appsettings.json` → Default). Schreibt immer in `appsettings.Production.json`.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -295,8 +299,8 @@ Eine Session kann bis zu **vier Agents** haben: Worker (Pflicht), Preparer (opti
|
|||||||
|
|
||||||
## Wichtige Regeln beim Entwickeln
|
## Wichtige Regeln beim Entwickeln
|
||||||
|
|
||||||
- ⚠️ **Quelldateien in `wwwroot/`** editieren, NICHT in `publish/wwwroot/`
|
- ⚠️ **Quelldateien in `wwwroot/`** editieren, NICHT in `Build/*/publish/wwwroot/`
|
||||||
- ⛔ **`publish/data/gott.db`** niemals manuell modifizieren/löschen
|
- ⛔ **`Build/*/publish/data/gott.db`** niemals manuell modifizieren/löschen
|
||||||
- ⛔ **`publish/`** generell nicht anfassen
|
- ⛔ **`Build/`** generell nicht anfassen
|
||||||
- 🔧 **.NET 10** ohne Nullable, ohne Implicit Usings
|
- 🔧 **.NET 10** ohne Nullable, ohne Implicit Usings
|
||||||
- 📦 DB-Migrationen sind idempotent (IF NOT EXISTS Pattern in `DatabaseService`)
|
- 📦 DB-Migrationen sind idempotent (IF NOT EXISTS Pattern in `DatabaseService`)
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
<Project>
|
||||||
|
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('Windows'))">
|
||||||
|
<BaseIntermediateOutputPath>Build\Windows\obj\</BaseIntermediateOutputPath>
|
||||||
|
<MSBuildProjectExtensionsPath>Build\Windows\obj\</MSBuildProjectExtensionsPath>
|
||||||
|
<BaseOutputPath>Build\Windows\bin\</BaseOutputPath>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('Linux'))">
|
||||||
|
<BaseIntermediateOutputPath>Build/Linux/obj/</BaseIntermediateOutputPath>
|
||||||
|
<MSBuildProjectExtensionsPath>Build/Linux/obj/</MSBuildProjectExtensionsPath>
|
||||||
|
<BaseOutputPath>Build/Linux/bin/</BaseOutputPath>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('OSX'))">
|
||||||
|
<BaseIntermediateOutputPath>Build/macOS/obj/</BaseIntermediateOutputPath>
|
||||||
|
<MSBuildProjectExtensionsPath>Build/macOS/obj/</MSBuildProjectExtensionsPath>
|
||||||
|
<BaseOutputPath>Build/macOS/bin/</BaseOutputPath>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
||||||
@@ -17,7 +17,7 @@ namespace Gott.Endpoints;
|
|||||||
|
|
||||||
public static class OpenClawEndpoint
|
public static class OpenClawEndpoint
|
||||||
{
|
{
|
||||||
private const string OpenClawDbRelativePath = "publish/data/openclaw-sessions.db";
|
private static readonly string OpenClawDbRelativePath = Path.Combine("data", "openclaw-sessions.db");
|
||||||
private const string ImportTag = "openclaw-import";
|
private const string ImportTag = "openclaw-import";
|
||||||
|
|
||||||
public static void MapOpenClawEndpoints(this IEndpointRouteBuilder app)
|
public static void MapOpenClawEndpoints(this IEndpointRouteBuilder app)
|
||||||
@@ -28,18 +28,7 @@ public static class OpenClawEndpoint
|
|||||||
|
|
||||||
private static string GetOpenClawDbPath()
|
private static string GetOpenClawDbPath()
|
||||||
{
|
{
|
||||||
// Resolve relative to the app base directory
|
var candidate = Path.Combine(AppContext.BaseDirectory, OpenClawDbRelativePath);
|
||||||
var basePath = AppContext.BaseDirectory;
|
|
||||||
// Navigate up from bin/Debug/net10.0 or similar to the project root
|
|
||||||
var candidate = Path.Combine(basePath, OpenClawDbRelativePath);
|
|
||||||
if (File.Exists(candidate)) return candidate;
|
|
||||||
|
|
||||||
// Try from current directory
|
|
||||||
candidate = Path.Combine(Directory.GetCurrentDirectory(), OpenClawDbRelativePath);
|
|
||||||
if (File.Exists(candidate)) return candidate;
|
|
||||||
|
|
||||||
// Try absolute common path
|
|
||||||
candidate = Path.Combine("/app/gott", OpenClawDbRelativePath);
|
|
||||||
if (File.Exists(candidate)) return candidate;
|
if (File.Exists(candidate)) return candidate;
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ Self-hosted AI-Coding-Agent auf Basis der Anthropic Claude API. Stellt eine Web-
|
|||||||
|
|
||||||
## Konfiguration
|
## Konfiguration
|
||||||
|
|
||||||
Beim ersten Start wird `appsettings.json` mit Standardwerten verwendet. Für eigene Einstellungen eine `appsettings.Production.json` im `publish/`-Verzeichnis anlegen (oder über die Admin-UI verwalten):
|
Beim ersten Start wird `appsettings.json` mit Standardwerten verwendet. Für eigene Einstellungen eine `appsettings.Production.json` im `Build/Linux/publish/`-Verzeichnis anlegen (oder über die Admin-UI verwalten):
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
@@ -79,7 +79,7 @@ Beim ersten Start wird `appsettings.json` mit Standardwerten verwendet. Für eig
|
|||||||
| `KreaToken` | Krea AI API Token (optional) | – |
|
| `KreaToken` | Krea AI API Token (optional) | – |
|
||||||
| `KreaApiKey` | API-Key für Krea-Endpoints ohne User-Auth (optional) | – |
|
| `KreaApiKey` | API-Key für Krea-Endpoints ohne User-Auth (optional) | – |
|
||||||
|
|
||||||
> **Hinweis:** Die `appsettings.Production.json` wird **nicht** beim `dotnet publish` mitkopiert. Sie lebt ausschließlich im `publish/`-Verzeichnis und kann über die Admin-UI (`#/server-settings`) verwaltet werden.
|
> **Hinweis:** Die `appsettings.Production.json` wird **nicht** beim `dotnet publish` mitkopiert. Sie lebt ausschließlich im `Build/Linux/publish/`-Verzeichnis und kann über die Admin-UI (`#/server-settings`) verwaltet werden.
|
||||||
|
|
||||||
## Starten
|
## Starten
|
||||||
|
|
||||||
@@ -117,7 +117,7 @@ After=network.target
|
|||||||
[Service]
|
[Service]
|
||||||
Type=exec
|
Type=exec
|
||||||
WorkingDirectory=/app/gott
|
WorkingDirectory=/app/gott
|
||||||
ExecStart=/app/gott/publish/gott
|
ExecStart=/app/gott/Build/Linux/publish/gott
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
RestartSec=5
|
RestartSec=5
|
||||||
|
|
||||||
@@ -142,7 +142,15 @@ gott/
|
|||||||
│ ├── js/ # App, Router, API, Chat, UI-Module (modular aufgeteilt), Pages
|
│ ├── js/ # App, Router, API, Chat, UI-Module (modular aufgeteilt), Pages
|
||||||
│ └── css/ # Styles (theme.css = CSS Variables)
|
│ └── css/ # Styles (theme.css = CSS Variables)
|
||||||
├── WindowsApp/ # WPF + WebView2 Desktop Client
|
├── WindowsApp/ # WPF + WebView2 Desktop Client
|
||||||
└── publish/ # Build-Output + Laufzeit-Daten
|
└── Build/ # Build-Output + Laufzeit-Daten
|
||||||
|
├── Linux/
|
||||||
|
│ ├── bin/
|
||||||
|
│ ├── obj/
|
||||||
|
│ └── publish/
|
||||||
|
└── Windows/
|
||||||
|
├── bin/
|
||||||
|
├── obj/
|
||||||
|
└── publish/
|
||||||
└── data/
|
└── data/
|
||||||
├── gott.db # SQLite Datenbank
|
├── gott.db # SQLite Datenbank
|
||||||
├── agents/{id}/ # Memory-Dateien pro Agent
|
├── agents/{id}/ # Memory-Dateien pro Agent
|
||||||
|
|||||||
@@ -3,6 +3,6 @@ set -e
|
|||||||
cd /app/gott
|
cd /app/gott
|
||||||
export PATH="$HOME/.dotnet:$PATH"
|
export PATH="$HOME/.dotnet:$PATH"
|
||||||
systemctl stop gott
|
systemctl stop gott
|
||||||
dotnet publish -c Release -o publish
|
dotnet publish -c Release -o Build/Linux/publish
|
||||||
systemctl start gott
|
systemctl start gott
|
||||||
echo "OK"
|
echo "OK"
|
||||||
+5
-15
@@ -5,18 +5,12 @@
|
|||||||
<NoWarn>ASP0015;IDE0017;IDE0028;IDE0130;IDE0305;IDE1006;SYSLIB1045</NoWarn>
|
<NoWarn>ASP0015;IDE0017;IDE0028;IDE0130;IDE0305;IDE1006;SYSLIB1045</NoWarn>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<!-- Exclude Build output and other non-source directories -->
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Remove="publish/**" />
|
<Compile Remove="Build/**" />
|
||||||
<Content Remove="publish/**" />
|
<Content Remove="Build/**" />
|
||||||
<EmbeddedResource Remove="publish/**" />
|
<EmbeddedResource Remove="Build/**" />
|
||||||
<None Remove="publish/**" />
|
<None Remove="Build/**" />
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Remove="publish-win/**" />
|
|
||||||
<Content Remove="publish-win/**" />
|
|
||||||
<EmbeddedResource Remove="publish-win/**" />
|
|
||||||
<None Remove="publish-win/**" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -37,10 +31,6 @@
|
|||||||
<Content Include="Templates/**" CopyToOutputDirectory="PreserveNewest" CopyToPublishDirectory="PreserveNewest" />
|
<Content Include="Templates/**" CopyToOutputDirectory="PreserveNewest" CopyToPublishDirectory="PreserveNewest" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<Content Update="appsettings.Production.json" CopyToOutputDirectory="Never" CopyToPublishDirectory="Never" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Cronos" Version="0.11.1" />
|
<PackageReference Include="Cronos" Version="0.11.1" />
|
||||||
<PackageReference Include="Dapper" Version="2.1.66" />
|
<PackageReference Include="Dapper" Version="2.1.66" />
|
||||||
|
|||||||
Reference in new issue
Block a user