# Flook Stacks
Docker Compose stacks for Flook (192.168.1.75) managed via Portainer.

## Stacks
| Stack | Services | Port(s) | Description |
|-------|----------|---------|-------------|
| portainer | portainer | 9000 | Stack management |
| documents | paperless, paperless-db, paperless-redis, paperless-tika, paperless-gotenberg, onlyoffice | 8777, 8089, 4430 | Document management |
| productivity | gitlab, vaultwarden, freshrss, linkwarden, prosody | 8929, 4743, 8054, 3030, 5222, 5269 | Personal tools + XMPP |
| backup | borgmatic | - | Borg backup to chook |
| seafile | seafile, seadoc, mysql, redis, notification, md-server, seasearch | 8098, 8888, 8083, 8084, 4080 | File sync |
| outline | outline, postgres, redis | 3000 | Wiki |
| plane | web, api, worker, beat-worker, admin, space, live, proxy, db, redis, mq, minio | 8082 | Project management |
| obsidian | couchdb | 5984 | Obsidian LiveSync backend |

## External Services (qsrproxy - 192.168.1.72)
| Service | Port(s) | Description |
|---------|---------|-------------|
| npm | 1880, 18443, 81 | Nginx Proxy Manager (CRITICAL) |
| prometheus | 9090 | Metrics collection |
| grafana | 3000 | Dashboards |
| alertmanager | 9093 | Alert routing |
| node-exporter | 9100 | System metrics |

## Deployment Order
1. `portainer` - Deploy first, manually
2. `productivity` - GitLab, Vaultwarden, FreshRSS, Linkwarden, Prosody
3. `documents` - Paperless, OnlyOffice
4. `backup` - Borgmatic
5. `seafile` - File sync and collaboration
6. `outline` - Wiki
7. `plane` - Project management
8. `obsidian` - CouchDB for Obsidian LiveSync

## Prosody Notes
Self-hosted XMPP server for `rishighan.com`. See `stacks/productivity/README.md` for full config.

TLS cert expires **2026-05-24** — renew manually via certbot DNS challenge before then.

Ports 5222 and 5269 must be forwarded on the UDM Pro to Flook (192.168.1.75).
File uploads proxied via NPM: `xmpp.rishighan.com` → `192.168.1.75:5280`.

## Obsidian LiveSync Notes
CouchDB provides sync backend for Obsidian LiveSync between iPhone and Bluefin.
Accessible at `obsidian.rishighan.com` via NPM proxy → `192.168.1.75:5984`.

Admin UI at `https://obsidian.rishighan.com/_utils`.

## Plane Notes
Plane requires specific env variables. Run with:
```bash
cd /mnt/user/data/flook-stacks/stacks/plane
docker compose --env-file plane.env up -d
```
Key env settings:
- `APP_DOMAIN=plane.rishighan.com`
- `LISTEN_HTTP_PORT=8082`
- `WEB_URL=https://plane.rishighan.com`
- `CERT_EMAIL=email admin@rishighan.com`

## Seafile Notes
Seafile uses multiple compose files and cannot be deployed via Portainer git stack. Deploy from command line:
```bash
cd /mnt/user/appdata/seafile
docker compose up -d
```

## Repository
```
https://git.rishighan.com/root/flook-stacks.git
```
