Skip to content

Getting started

This page covers the ideas orca is built around. To set up a real workspace from scratch, see Setting up a workspace.

Requirements

Orca shells out to a few tools, which must be on your PATH:

  • docker, with the docker compose plugin
  • git

Run orca sys check to confirm they're available.

Core concepts

Projects

A project is a single repository (or directory) containing a docker compose file and an orca.project.yaml. The project config tells orca which compose file to use, which env files to pass, which hostnames and TLS certificates it needs, and so on. See the project config reference.

Each project is run as its own compose project named orca-{workspace}-{project}, so projects never clash with each other, or with anything you start with plain docker compose.

Workspaces

A workspace is a named group of projects that make up an environment, e.g. an API, a frontend and the shared infrastructure they both use. It's defined by an orca.workspace.yaml file. That file lists each project, where to clone it from, and which other projects it depends on. See the workspace config reference.

The workspace file normally lives in a repository of its own, or in one of the projects (marked with self: true). Everyone working on the environment then shares the same definition.

Your user config

Orca keeps track of your workspaces, and where each project is cloned on your machine, in ~/.orca/orca.yaml. It's created on first run, and orca updates it for you when you initialise workspaces, clone projects and switch workspaces. See the user config reference.

The current workspace

One workspace can be selected as the current workspace with orca ws switch. It's used when you run a command outside any project directory without saying which workspace you mean. See Choosing a workspace and project for exactly how that's decided.

Quick start

Assuming someone has already written the orca.workspace.yaml and orca.project.yaml files for your environment:

# Clone the repository containing the workspace config, register the
# workspace, and clone all of its projects next to it
$ mkdir -p ~/code/acme && cd ~/code/acme
$ orca ws init --repo acme/local-env
$ cd local-env

# Make it the current workspace
$ orca ws switch acme

# Start everything, in dependency order. "-w" is needed because we're inside
# the local-env project, where a plain "orca up" would only start local-env.
$ orca up -w acme

Then, from inside any project's directory, commands apply to just that project:

$ cd ~/code/acme/api
$ orca logs              # follow this project's logs
$ orca exec app sh       # open a shell in its "app" service
$ orca restart           # restart just this project

Where next