Add Blinko stack - Note-taking app with Ollama AI integration

This commit is contained in:
nocci 2026-03-29 11:08:36 +02:00
parent 0e3f9d74d4
commit ebd6e7c3ee
4 changed files with 160 additions and 0 deletions

10
stacks/blinko/Caddyfile Normal file
View file

@ -0,0 +1,10 @@
:80 {
# Fix Blinko Bug: /embed* -> /api/embed*
handle /embed* {
uri replace /embed /api/embed
reverse_proxy ollama:11434
}
# Alles andere direkt zu Ollama
reverse_proxy ollama:11434
}

68
stacks/blinko/README.md Normal file
View file

@ -0,0 +1,68 @@
# Blinko
📝 Self-hosted note-taking app with AI integration (Ollama)
## Deploy in Komodo
**Pfad:** `stacks/blinko/`
## Secrets
Erstelle eine `.env` Datei im Stack-Verzeichnis:
```bash
# NextAuth
NEXTAUTH_SECRET=<openssl rand -base64 48>
# PostgreSQL
POSTGRES_PASSWORD=<secure-password>
POSTGRES_USER=postgres
POSTGRES_DB=postgres
# Domain (optional, default: https://blink.nocci.it)
NEXTAUTH_URL=https://blink.your-domain.com
NEXT_PUBLIC_BASE_URL=https://blink.your-domain.com
```
## Ports
| Service | Port | Beschreibung |
|---------|------|--------------|
| blinko-website | 1110 | Web UI |
| postgres | 5435 | Datenbank (nur intern empfohlen) |
| ollama | 11434 | Ollama API |
## Caddy
Für externen Zugriff:
```caddyfile
blink.example.com {
reverse_proxy localhost:1110
}
ollama.example.com {
reverse_proxy localhost:11434
}
```
## Ollama Models
Nach dem Deploy Modelle pullen:
```bash
docker exec -it blinko-ollama ollama pull llama3.2
docker exec -it blinko-ollama ollama pull nomic-embed-text
```
## Volumes
- `blinko_data``/app/.blinko` (Notizen & Daten)
- `postgres_data``/var/lib/postgresql/data` (Datenbank)
- `ollama_data``/root/.ollama` (AI Modelle)
## Health Checks
- Blinko: HTTP Check auf Port 1111
- PostgreSQL: `pg_isready` Check
- Ollama: Container läuft

View file

@ -0,0 +1,78 @@
services:
blinko-website:
image: blinkospace/blinko:latest
container_name: blinko-website
restart: always
environment:
- NODE_ENV=production
- NEXTAUTH_URL=${NEXTAUTH_URL:-https://blink.nocci.it}
- NEXT_PUBLIC_BASE_URL=${NEXT_PUBLIC_BASE_URL:-https://blink.nocci.it}
- NEXTAUTH_SECRET=${NEXTAUTH_SECRET}
- DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
depends_on:
postgres:
condition: service_healthy
volumes:
- blinko_data:/app/.blinko
networks:
- blinko-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:1111/"]
interval: 30s
timeout: 10s
retries: 5
start_period: 30s
logging:
options:
max-size: 10m
max-file: "3"
postgres:
image: postgres:14
container_name: blinko-postgres
restart: always
environment:
- POSTGRES_DB=${POSTGRES_DB:-postgres}
- POSTGRES_USER=${POSTGRES_USER:-postgres}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- TZ=Europe/Berlin
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- blinko-network
healthcheck:
test: ["CMD", "pg_isready", "-U", "${POSTGRES_USER:-postgres}", "-d", "${POSTGRES_DB:-postgres}"]
interval: 5s
timeout: 10s
retries: 5
ollama:
image: ollama/ollama:latest
container_name: blinko-ollama
restart: always
environment:
- OLLAMA_HOST=0.0.0.0:11434
volumes:
- ollama_data:/root/.ollama
networks:
- blinko-network
ollama-proxy:
image: caddy:2
container_name: blinko-ollama-proxy
restart: unless-stopped
depends_on:
- ollama
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
networks:
- blinko-network
volumes:
blinko_data:
postgres_data:
ollama_data:
networks:
blinko-network:
driver: bridge

4
stacks/blinko/stack.toml Normal file
View file

@ -0,0 +1,4 @@
[[stacks]]
name = "blinko"
description = "Note-taking app with AI integration (Ollama)"
compose_path = "compose.yml"