Docker Setup

Run StreamHouse with Docker and Docker Compose.

10 min readGetting Started

Docker Compose Setup

The recommended way to run StreamHouse locally is with Docker Compose. This starts all required services including PostgreSQL for metadata, MinIO for S3-compatible storage, and the StreamHouse server.

yaml
# docker-compose.yml
version: '3.8'

services:
  streamhouse:
    image: streamhouse/streamhouse:latest
    ports:
      - "8080:8080"
      - "9092:9092"
    environment:
      - METADATA_URL=postgresql://postgres:postgres@postgres:5432/streamhouse
      - S3_ENDPOINT=http://minio:9000
      - S3_BUCKET=streamhouse
      - S3_ACCESS_KEY=minioadmin
      - S3_SECRET_KEY=minioadmin
    depends_on:
      - postgres
      - minio

  postgres:
    image: postgres:16
    environment:
      POSTGRES_DB: streamhouse
      POSTGRES_PASSWORD: postgres
    volumes:
      - pgdata:/var/lib/postgresql/data

  minio:
    image: minio/minio
    command: server /data --console-address ":9001"
    ports:
      - "9000:9000"
      - "9001:9001"
    environment:
      MINIO_ROOT_USER: minioadmin
      MINIO_ROOT_PASSWORD: minioadmin

  web:
    image: streamhouse/web:latest
    ports:
      - "3000:3000"
    environment:
      - INTERNAL_API_URL=http://streamhouse:8080

volumes:
  pgdata:

Starting the Stack

Start all services with a single command.

bash
# Start in background
docker compose up -d

# Check that all services are running
docker compose ps

# View logs
docker compose logs -f streamhouse

MinIO Bucket Setup

MinIO provides S3-compatible storage for local development. After starting the stack, create the required bucket.

bash
# Create the bucket using MinIO client
docker compose exec minio mc alias set local http://localhost:9000 minioadmin minioadmin
docker compose exec minio mc mb local/streamhouse

# Or use the MinIO console at http://localhost:9001

Production Considerations

For production deployments, consider using managed services for PostgreSQL and S3 instead of running them in containers.

  • Use Amazon RDS or Aurora for PostgreSQL metadata storage
  • Use Amazon S3 directly instead of MinIO
  • Deploy StreamHouse agents behind a load balancer
  • Configure resource limits and health checks in your orchestrator
  • Enable TLS for all connections