Skip to content

Docker

docker-compose.yml contains the entire stack to run everything from the app to Horizon and Pulse. Make sure you have something lightweight like OrbStack (for macOS) installed to be able to run Docker.

Getting started

To start from scratch:

shell
composer run-script docker:reset

Starting

Start the services (in the background):

shell
docker compose up -d

Start all containers, including optional ones:

shell
docker compose --profile default --profile optional up -d

Rebuild, start, and wait for containers to be healthy:

shell
docker compose up -d --build --wait

Rebuild without cache and start:

shell
docker compose build --no-cache && docker compose up -d

Rebuild (with latest remote changes) without cache and start:

shell
docker compose build --pull --no-cache && docker compose up -d

Stopping

Stop the running services:

bash
docker compose stop

Stop the running services and destroy the containers (!):

bash
docker compose down

Logs

View the logs for all services:

bash
docker compose logs

View the logs for a specific service (e.g., php):

bash
docker compose logs php

Containers

Run a command in a running container:

bash
docker compose exec php sh
docker compose exec php bash

Spin up container, run command, stop and remove container:

bash
docker compose run --rm node npm ci && npm run build

Status

Check the status of the services:

bash
docker compose ps -a

Deleting

Remove unused containers, networks, images, and volumes:

bash
docker system prune