Nomad changes
All checks were successful
Deploy fil (kreuzberg) / deploy (push) Successful in 49s

This commit is contained in:
Henrik Jess Nielsen
2026-06-01 23:40:55 +02:00
parent 72b1a0a6ed
commit b4c07d3693
5723 changed files with 1130655 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
```bash title="Bash"
# Default: http://127.0.0.1:8000
kreuzberg serve
# Custom host and port
kreuzberg serve -H 0.0.0.0 -p 3000
# With configuration file
kreuzberg serve --config kreuzberg.toml
```

View File

@@ -0,0 +1,24 @@
```csharp title="C#"
using System;
using System.Diagnostics;
class ApiServer
{
static void Main()
{
var processInfo = new ProcessStartInfo
{
FileName = "kreuzberg",
Arguments = "serve -H 0.0.0.0 -p 8000",
UseShellExecute = false,
RedirectStandardOutput = true,
RedirectStandardError = true
};
using (var process = Process.Start(processInfo))
{
process?.WaitForExit();
}
}
}
```

View File

@@ -0,0 +1,8 @@
```bash title="Bash"
# Run server on port 8000
docker run -d \n -p 8000:8000 \n ghcr.io/kreuzberg-dev/kreuzberg:latest \n serve -H 0.0.0.0 -p 8000
# With environment variables
docker run -d \n -e KREUZBERG_CORS_ORIGINS="https://myapp.com" \n -e KREUZBERG_MAX_MULTIPART_FIELD_BYTES=209715200 \n -p 8000:8000 \n ghcr.io/kreuzberg-dev/kreuzberg:latest \n serve -H 0.0.0.0 -p 8000
```

View File

@@ -0,0 +1,18 @@
```go title="Go"
package main
import (
"log"
"os/exec"
)
func main() {
cmd := exec.Command("kreuzberg", "serve", "-H", "0.0.0.0", "-p", "8000")
cmd.Stdout = log.Writer()
cmd.Stderr = log.Writer()
if err := cmd.Run(); err != nil {
log.Fatalf("failed to start server: %v", err)
}
}
```

View File

@@ -0,0 +1,19 @@
```java title="Java"
import java.io.IOException;
public class ApiServer {
public static void main(String[] args) {
try {
ProcessBuilder pb = new ProcessBuilder(
"kreuzberg", "serve", "-H", "0.0.0.0", "-p", "8000"
);
pb.inheritIO();
Process process = pb.start();
process.waitFor();
} catch (IOException | InterruptedException e) {
System.err.println("Failed to start server: " + e.getMessage());
}
}
}
```

View File

@@ -0,0 +1,6 @@
```python title="Python"
# Start server
import subprocess
subprocess.Popen(["python", "-m", "kreuzberg", "serve", "-H", "0.0.0.0", "-p", "8000"])
```

View File

@@ -0,0 +1,11 @@
```rust title="Rust"
use kreuzberg::{ExtractionConfig, api::serve_with_config};
#[tokio::main]
async fn main() -> kreuzberg::Result<()> {
let config = ExtractionConfig::discover()?;
serve_with_config("0.0.0.0", 8000, config).await?;
Ok(())
}
```