Skip to main content

Docker Compose

Compose definitions live in grid-core/install:

FilePurpose
docker-compose.ymlBuild core and ui from source
docker-compose.release.ymlRun pre-built images from GHCR

Version pins and channels: Releases.

Build from source​

git clone https://github.com/gridplatform/grid-core.git
cd grid-core
cp install/.env.example install/.env

Set GRID_AUTH_ADMIN_PASSWORD. Optional pins: GRID_CLI_REF, GRID_UI_REF.

docker compose -f install/docker-compose.yml --env-file install/.env up -d --build
bash install/verify.sh

Pre-built images​

git clone https://github.com/gridplatform/grid-core.git
cd grid-core
cp install/.env.example install/.env

Set GRID_AUTH_ADMIN_PASSWORD. Set GRID_RELEASE_CHANNEL (current or lts) or GRID_VERSION (exact tag).

docker compose -f install/docker-compose.release.yml --env-file install/.env pull
docker compose -f install/docker-compose.release.yml --env-file install/.env up -d
bash install/verify.sh

Runtime notes​

  • Always start detached (-d). Foreground Compose stops when the session ends.
  • On a VM: enable Docker on boot, and optionally grid-compose.service. Services use restart: unless-stopped.
  • core embeds grid-cli and Terraform. ui serves the console and proxies /api to core.
  • HTTP port: GRID_HTTP_PORT (default 80). Open http://<host>/.
  • Before applying infrastructure, configure remote state (GRID_TF_*). See Remote Terraform state.
  • Metrics are systemd units on the host (install/monitoring/install-systemd.sh). Grid compose down does not stop Prometheus/Alloy. See MONITORING.md.

Environment variables​

VariablePurpose
GRID_AUTH_ADMIN_PASSWORDBootstrap admin password (required)
GRID_AUTH_ADMIN_EMAILBootstrap admin email
GRID_GITOPS_REPO_URLDesired-state repository
GRID_MODULE_BANKTerraform module bank URL
GRID_CLI_REFgrid-cli git ref for source builds
GRID_UI_REFgrid-ui git ref for source builds
GRID_UI_CONTEXTOverride UI build context
GRID_RELEASE_CHANNELcurrent or lts (release compose)
GRID_VERSIONExact image tag (release compose)

Full list: Configuration and install/.env.example.

Volumes​

VolumeMount
grid-dataUsers, releases, audit, module-bank cache
grid-workspacesTerraform workspaces
grid-desired-stateGitOps working tree

Cloud credentials​

Terraform runs inside the core container. Mount provider credentials via a Compose override, for example:

services:
core:
volumes:
- ${HOME}/.aws:/root/.aws:ro

Instance roles or workload identity on the host are also supported.

Upgrades​

Source build:

cd grid-core
git fetch && git checkout <tag>
docker compose -f install/docker-compose.yml --env-file install/.env up -d --build

Pre-built images — update GRID_VERSION or GRID_RELEASE_CHANNEL in install/.env, then:

docker compose -f install/docker-compose.release.yml --env-file install/.env pull
docker compose -f install/docker-compose.release.yml --env-file install/.env up -d

Install on a VM · Configuration · Releases