Skip to content

BakedSoups/ebitdock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ebitdock

Ebitengine is a lightweight way to build games in Go, and its WebAssembly target makes browser games feel natural without pulling in a JavaScript framework.

I built ebitdock while experimenting with live-service browser games in Ebitengine. Making online Ebitengine games meant managing more than the game loop locally: WASM builds, static web serving, backend APIs, realtime services, databases, ports, logs, and rebuilds.

ebitdock is a Go-native dev orchestrator for that stack. It uses Docker Compose around an Ebitengine WASM game so local development looks closer to the shape you would use for CI/CD, deployment, multiplayer backends, databases, dashboards, and repeatable builds.

It does not generate your web app, hide Ebitengine, require Node.js, or become a game framework. Your project owns the game code, HTML shell, JS bridge, assets, APIs, and databases. ebitdock owns the orchestration around them.

Demo

ebitdock dev builds the Ebitengine WASM game, starts the local Docker Compose stack, serves the browser client, and exposes a dashboard for ports, logs, build status, and service health.

ebitdock_dev.mp4

The example live-service game runs web, API, realtime, admin, and Postgres services together.

Dashboard

Keep track of ports, service status, WASM build state, checks, watched files, and logs from one local dashboard.

dash.mp4

Containerized WASM Stack

Build the Ebitengine WASM output in a Go container and run the surrounding services through Docker Compose, which makes the development stack easier to reproduce in CI/CD pipelines.

composedown.mp4

Requirements

  • Go
  • Docker with the Compose plugin
  • wasmserve
  • Linux/macOS first

Install

Install the CLI with Go:

go install github.com/BakedSoups/ebitdock/cmd/ebitdock@latest

Make sure Go's bin directory is on your PATH:

export PATH="$HOME/go/bin:$PATH"

Install helper tools and check your machine:

ebitdock install tools
ebitdock doctor

ebitdock install tools installs Go-based helper tools such as wasmserve. Docker is installed through your OS or Docker Desktop; ebitdock doctor will tell you if Docker or the Compose plugin is missing.

For local development of ebitdock itself:

git clone https://github.com/BakedSoups/ebitdock
cd ebitdock
go install ./cmd/ebitdock

Commands

ebitdock init [name|.]
ebitdock install tools
ebitdock dev
ebitdock down
ebitdock wasm
ebitdock build wasm
ebitdock logs
ebitdock doctor

Existing Project

From your Ebitengine repo:

ebitdock init

This writes only ebitdock.yaml. It does not overwrite your game, static files, assets, or backend.

Edit the generated config so game.package, game.output, services.web.root, and any API ports match your project.

Then run:

ebitdock doctor
ebitdock dev

ebitdock doctor is the toolchain check. It reports missing Docker, missing wasmserve, bad ports, missing game packages, and static root issues before you start a dev session.

To compile only the browser build:

ebitdock wasm

ebitdock build wasm is the longer equivalent.

What Dev Does

ebitdock dev:

  • verifies wasmserve is installed for Ebitengine browser dev diagnostics
  • builds your Ebitengine game to WASM in a Go Docker container
  • copies the matching wasm_exec.js from that same Go image
  • writes .ebitdock/compose.yaml
  • starts Docker Compose for the web/API services
  • starts the local dashboard
  • watches configured files and rebuilds WASM on source changes
  • writes logs to .ebitdock/ebitdock.log

The dashboard shows ports, build/check status, watched paths, errors, and recent logs.

To stop the containers and release the ports opened by the ebitdock Compose stack:

ebitdock down

Example Config

project: my-game

game:
  package: ./cmd/game
  output: ./static/game.wasm

wasm:
  exec: ./static/wasm_exec.js

docker:
  compose_file: ./.ebitdock/compose.yaml
  go_image: golang:1.24

services:
  web:
    root: ./static
    port: 8080
    image: nginx:1.27-alpine
    workdir: /usr/share/nginx/html
    volumes:
      - ./static:/usr/share/nginx/html:ro

  api:
    enabled: false
    command: go run ./server
    port: 3001
    image: golang:1.24
    workdir: /app
    volumes:
      - .:/app

dashboard:
  port: 8081

watch:
  rebuild:
    - ./cmd/**/*.go
    - ./internal/**/*.go
    - ./assets/**
  static:
    - ./static/**

Why This Helps

Ebitengine keeps the game loop Go-native and lightweight. ebitdock handles the surrounding dev orchestration: containerized WASM builds, wasmserve-aware browser diagnostics, static web serving, service ports, logs, health, databases, realtime backends, and dashboard visibility.

That makes it useful for simple browser builds and especially for live-service games that need more than one process.

GitHub Checks

The included GitHub Actions workflow runs formatting, vet, tests, CLI build, and an init smoke test on pull requests and pushes.

About

Docker Compose-style dev tooling for Ebitengine WASM games, built for live-service projects with multiple ports, services, logs, and dashboards.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors