Getting Started
The mediamoth repository currently provides a complete source-development environment. It does not provide a portable, public production bundle: the checked-in production Compose example references project-local registry images and host-specific mounts. Use the development workflow below unless you operate equivalent images and infrastructure.
Prerequisites
- Git
- Docker with Docker Compose v2
- mise
- GitHub credentials that can download MediaMoth's private Go modules
The repository pins Go 1.26.0 and its other tools through mise.
Clone and configure
Run the following commands from the directory where you keep source checkouts to create and configure a local mediamoth checkout:
git clone [email protected]:mediamoth/mediamoth.git
cd mediamoth
cp .mise.local.toml.example .mise.local.toml
mise trust
mise installSet GITHUB_TOKEN in .mise.local.toml or your shell and configure private Go module access:
export GOPRIVATE=github.com/mediamoth
export GITHUB_TOKEN="$(gh auth token)"Install the repository's lint tool when you plan to contribute:
mise run install-golangci-lintDelve is optional:
mise run install-delveStart a service
Run a named development task from the repository root:
mise run dev:video-serviceThe Compose task starts the selected service and its declared dependencies. Other service tasks include:
mise run dev:media-service
mise run dev:workflow-service
mise run dev:job-service
mise run dev:search-service
mise run dev:tbc-service
mise run dev:vhs-decode-service
mise run dev:chapter-inserterUse mise tasks for the authoritative list.
Development endpoints
The development Compose file publishes:
| Component | Host port |
|---|---|
| Media Service gRPC | 50051 |
| Workflow Service gRPC | 50052 |
| Job Service gRPC | 50053 |
| Search Service gRPC | 50054 |
| Video Service gRPC | 50055 |
| TBC Service gRPC | 50056 |
| VHS Decode Service gRPC | 50057 |
| Chapter Inserter gRPC | 50058 |
| Kafka | 9092 |
| PostgreSQL | 5051 |
| Redis | 6379 |
| Kafdrop | 9000 |
| Elasticsearch | 9200 |
| Kibana | 5601 |
| MQTT | 1883 |
Every gRPC service also registers the standard gRPC health service.
Common operations
Use these tasks from the repository root to inspect the local environment or work on Video Service:
mise run logs
mise run down
mise run test:video-service
mise run lint:video-service
mise run tidy:video-service
mise run psql:video-serviceAggregate tasks are also available:
mise run test
mise run lint
mise run tidyLocal go-libs or protobuf changes
The default Docker path sets GOWORK=off. To test sibling checkouts, add them to go.work and run a workspace task:
go work use ../go-libs ../protobuf
mise run dev:video-service:workspaceYou can also set GOWORK=on for another development task.
SSH-backed file sources
Workers using rsync:// sources need SSH agent and known-host access inside their containers. The development Compose file mounts the SSH agent and ~/.ssh/known_hosts; verify ordinary SSH and rsync access on the host first.
See File Sources for the required URI syntax.