Skip to content

Daemon and Builds

Robert Lin edited this page Feb 17, 2019 · 1 revision

The Inertia daemon (inertiad) is the component of Inertia that runs on your remote VPS. It manages your deployed projects.

Daemon

The daemon is a server that exposes a number of endpoints over HTTPS. Both the CLI and the web app communicates with and controls the daemon through these endpoints.

Internally, inertiad is backed by BoltDB, an embedded key-value store, which is used to persist data across daemon restarts. Currently, this includes encrypted user credentials and environment values.

See the Architecture page and the design overview for more details.

Build Procedures

The daemon uses Docker's Golang client to communicate with the host's Docker socket, which is mounted into the daemon's container at startup. This is used to manage builds.

Docker-compose is currently backed by a containerized version of docker-compose, and Dockerfile builds are executed through a custom docker build implementation using the Go API. The build code can be found in package build. The legacy build code - used prior to v0.5.0, which included support for Heroku-style builds via herokuish - can be found in bobheadxi/go-build.

Daemon API

The daemon exposes a REST API that the CLI and web app uses to interact with the daemon. The API reference can be found here.