Files
memby/docker-compose.yml
T
ponzischeme89andClaude Opus 5 2ce405c540 Memby v0.1.53: Android TV client plus gateway
Android TV client for Emby (Kotlin, Compose for TV) and the Memby gateway
(Go, Postgres, Redis) that fronts it.

Client:
- Setup, profiles, home rows, Media3 playback, system screensaver (Dream)
- Backend chosen at build time: gateway when memby.gatewayUrl is set,
  otherwise direct to Emby. Both paths stay working.
- Server-composed home rows, rendered verbatim so new row types ship
  without an app release
- Full-screen animated maintenance state, row engagement telemetry

Gateway:
- One request per TV screen; auth, caching, search and row shaping
- Library import from Emby into Postgres (manual, then hourly incremental)
- Recommendations from viewing history (recency-weighted genre affinity)
- Admin page for imports, an offline switch, and per-row analytics
- Video always direct-plays from Emby; only metadata passes through

Identity is com.ponzischeme89.memby throughout, replacing
com.mattcohen.embyclientsname. A changed applicationId installs as a new
app: TVs need a fresh sign-in and the old package uninstalled.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-27 08:16:20 +12:00

69 lines
2.4 KiB
YAML

name: memby
services:
server:
build: ./server
restart: unless-stopped
ports:
- "${MEMBY_PORT:-8080}:8080"
environment:
MEMBY_LISTEN_ADDR: ":8080"
# How the gateway reaches Emby.
MEMBY_EMBY_URL: "${MEMBY_EMBY_URL:?set MEMBY_EMBY_URL in .env}"
# What the TVs are told to stream from. Only set this when it differs from the
# address above (video goes device -> Emby directly, never through the gateway).
MEMBY_EMBY_PUBLIC_URL: "${MEMBY_EMBY_PUBLIC_URL:-}"
MEMBY_DATABASE_URL: "postgres://memby:${POSTGRES_PASSWORD:?set POSTGRES_PASSWORD in .env}@postgres:5432/memby?sslmode=disable"
MEMBY_REDIS_URL: "redis://redis:6379/0"
MEMBY_HOME_TTL: "${MEMBY_HOME_TTL:-60s}"
# Unset disables /admin entirely — the library import, maintenance switch and
# analytics page all live behind it.
MEMBY_ADMIN_TOKEN: "${MEMBY_ADMIN_TOKEN:-}"
# Hourly incremental import: enough for episodes landing through the day, and
# films appearing weekly ride along.
MEMBY_SYNC_INTERVAL: "${MEMBY_SYNC_INTERVAL:-1h}"
MEMBY_SYNC_ON_START: "${MEMBY_SYNC_ON_START:-false}"
MEMBY_SYNC_USER_ID: "${MEMBY_SYNC_USER_ID:-}"
MEMBY_SYNC_API_KEY: "${MEMBY_SYNC_API_KEY:-}"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
# No shell or curl in a distroless image, so probe with the binary's own server
# via the container's TCP port from the Docker healthcheck's perspective.
test: ["CMD", "/app/memby-server", "-healthcheck"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
postgres:
image: postgres:17-alpine
restart: unless-stopped
environment:
POSTGRES_USER: memby
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD:?set POSTGRES_PASSWORD in .env}"
POSTGRES_DB: memby
volumes:
- memby-postgres:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U memby -d memby"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
restart: unless-stopped
command: ["redis-server", "--save", "", "--appendonly", "no", "--maxmemory", "256mb", "--maxmemory-policy", "allkeys-lru"]
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
volumes:
memby-postgres: