Skip to content

Go Overlay ​

ReleaseLicense

Go Overlay is a lightweight service supervisor for containers, inspired by s6-overlay. Run multiple services with dependencies, health checks, and graceful shutdown.

:material-rocket: Quick Start ​

1. Dockerfile ​

dockerfile
FROM debian:bookworm-slim

ADD https://github.com/corebunker/go-overlay/releases/latest/download/go-overlay /go-overlay
RUN chmod +x /go-overlay

COPY services.toml /services.toml
ENTRYPOINT ["/go-overlay"]

2. services.toml ​

toml
[[services]]
name = "app"
command = "/app/server"
required = true
restart = "on-failure"

[services.health_check]
endpoint = "http://localhost:8080/health"
interval = 30

3. Build & Run ​

bash
docker build -t myapp .
docker run myapp

:material-star: Features ​

FeatureDescription
Service Dependenciesdepends_on + wait_after for startup ordering
One-shot Jobsoneshot = true for migrations and init tasks
Health ChecksHTTP endpoint or command-based health monitoring
Restart Policiesnever, on-failure, always with max attempts
Environment VariablesInline env map or env_file per service
Graceful ShutdownSIGTERM → wait → SIGKILL with configurable timeouts
CLI Managementlist, status, restart via IPC socket
Pre/Post ScriptsRun scripts before/after service startup

:material-book-open: Documentation ​

:material-cog: CLI Commands ​

bash
# Start supervisor (reads /services.toml)
/go-overlay

# Check service status
go-overlay list
go-overlay status

# Restart a service
go-overlay restart api

:material-lightbulb: Use Cases ​

  • Multiple services in a single Docker container
  • Web apps with background workers
  • Development environments with multiple processes
  • Production containers needing reliable supervision

:material-github: Contributing ​

Contributions welcome! See Contributing Guide.

:material-license: License ​

MIT License. See LICENSE.

Released under the MIT License.