Skip to content

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:

bash
git clone [email protected]:mediamoth/mediamoth.git
cd mediamoth
cp .mise.local.toml.example .mise.local.toml
mise trust
mise install

Set GITHUB_TOKEN in .mise.local.toml or your shell and configure private Go module access:

bash
export GOPRIVATE=github.com/mediamoth
export GITHUB_TOKEN="$(gh auth token)"

Install the repository's lint tool when you plan to contribute:

bash
mise run install-golangci-lint

Delve is optional:

bash
mise run install-delve

Start a service

Run a named development task from the repository root:

bash
mise run dev:video-service

The Compose task starts the selected service and its declared dependencies. Other service tasks include:

bash
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-inserter

Use mise tasks for the authoritative list.

Development endpoints

The development Compose file publishes:

ComponentHost port
Media Service gRPC50051
Workflow Service gRPC50052
Job Service gRPC50053
Search Service gRPC50054
Video Service gRPC50055
TBC Service gRPC50056
VHS Decode Service gRPC50057
Chapter Inserter gRPC50058
Kafka9092
PostgreSQL5051
Redis6379
Kafdrop9000
Elasticsearch9200
Kibana5601
MQTT1883

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:

bash
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-service

Aggregate tasks are also available:

bash
mise run test
mise run lint
mise run tidy

Local 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:

bash
go work use ../go-libs ../protobuf
mise run dev:video-service:workspace

You 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.

Next steps

Released under the MIT License.