Files
indee-demo/docker-compose.yml
Dorian 0a7543cf32 Add Nostr relay + seed data to Docker deployment
- Add nostr-rs-relay service to docker-compose for persistent
  comments, reactions, and profiles on the dev server
- Add one-shot seeder container that auto-populates the relay
  with test personas, reactions, and comments on first deploy
- Proxy WebSocket connections through nginx at /relay so the
  frontend connects to the relay on the same host (no CORS)
- Make relay URL dynamic: reads from VITE_NOSTR_RELAYS in dev,
  auto-detects /relay proxy path in production Docker builds
- Make seed scripts configurable via RELAY_URL and ORIGIN env vars
- Add wait-for-relay script for reliable container orchestration
- Add "Resume last played" hero banner on My List tab

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 12:33:22 +00:00

59 lines
1.4 KiB
YAML

version: '3.8'
services:
# ── Frontend (nginx serving built Vue app) ───────────────────
app:
build:
context: .
dockerfile: Dockerfile
container_name: indeedhub-app
restart: unless-stopped
ports:
- "7777:7777"
depends_on:
seeder:
condition: service_completed_successfully
networks:
- indeedhub-network
labels:
- "com.centurylinklabs.watchtower.enable=true"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:7777/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# ── Nostr Relay (stores comments, reactions, profiles) ───────
relay:
image: scsibug/nostr-rs-relay:latest
container_name: indeedhub-relay
restart: unless-stopped
volumes:
- relay-data:/usr/src/app/db
networks:
- indeedhub-network
# ── Seeder (one-shot: seeds test data into relay, then exits) ─
# wait-for-relay.mjs handles readiness polling before seeding.
seeder:
build:
context: .
dockerfile: Dockerfile.seed
container_name: indeedhub-seeder
depends_on:
- relay
environment:
- RELAY_URL=ws://relay:8080
- ORIGIN=http://localhost:7777
networks:
- indeedhub-network
restart: "no"
networks:
indeedhub-network:
driver: bridge
volumes:
relay-data: