Docker Compose
Orchard uses PostgreSQL for storage. The repository includes a Docker Compose file for running just the database.
docker-compose.yml
The file at the root of the orchard repository:
services:
postgres:
image: postgres:16-alpine
container_name: orchard-postgres
environment:
POSTGRES_USER: orchard
POSTGRES_PASSWORD: orchard
POSTGRES_DB: orchard
ports:
- "5432:5432"
volumes:
- orchard-postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U orchard"]
volumes:
orchard-postgres-data:Running
docker compose up -d postgresRunning the Server
The Orchard API server (Trellis) currently runs as a native process, not a container. After PostgreSQL is running:
./gradlew :trellis:bootRunOr with the native binary:
./gradlew install
~/.orchard/bin/orchard-serverThe install task builds native images for both Trellis and Trowel and copies them into ~/.orchard/bin/. (Running ./gradlew :trellis:nativeCompile alone only produces the binary under trellis/build/native/nativeCompile/ — it does not install it.)
The dev-server profile (activated by trowel dev-server start) uses an embedded H2 database and does not require PostgreSQL. This is useful for local testing.
For a production deployment, also run Fence alongside Trellis — not containerized here, started from its release JAR (java -jar fence.jar). See the Deployment guide's Authentication (Fence) section for the required setup. Don't run Postgres-backed Trellis in production without it. Likewise run the SSH gateway from its release JAR (java -jar gateway.jar) on the same host. It's how cultivators SSH into groves in production. See the Deployment guide's SSH Gateway section.