Project config (orca.project.yaml)
Every service project needs an orca.project.yaml in the root of its directory, next to its compose file. It tells orca how to run the project. All paths in it are relative to the project's directory.
A library project doesn't need one. It can have one, for extensions, but it can't contain composeFiles, envFiles, hosts or tlsCerts, or command extensions with a service, as a library has no compose stack. Orca lists any it finds as invalid.
Example
composeFiles:
primary: docker-compose.yml
envFiles:
- path: .env
hosts:
- api.acme.test
tlsCerts:
- "*.acme.test"
extensions:
- name: env
type: syncFile
source: .env.example
target: .env
- name: artisan
service: app
command: php artisan
defaultArgs:
- list
- name: test
service: app
command: vendor/bin/phpunit
Reference
| Property | Description |
|---|---|
composeFiles |
The compose file for the project. |
envFiles |
Env files passed to docker compose. |
hosts |
Hostnames this project serves, added to /etc/hosts by orca hosts. |
tlsCerts |
Domains to generate TLS certificates for with orca tls gen. |
extensions |
Named steps, such as commands and files to set up, run with orca ext. |
hooks |
Extensions to run around operations, such as after the project is cloned. |
Compose files
primary is the compose file orca passes to docker compose, along with the overlay it generates. Keep this a normal compose file: orca makes its changes in the overlay, so the file still works with plain docker compose.
Not implemented yet
The config also accepts composeFiles.extras (extra compose files, optionally loaded only when conditions on OS, architecture or a property match) and a top-level properties list. Both are parsed but not used yet, so they currently have no effect.
Env files
Each file is passed to docker compose with --env-file, in order. Compose uses them for variable interpolation in the compose file, e.g. ${API_PORT}. They aren't automatically passed into containers; use env_file in your compose file for that.
Warning
When any --env-file is given, docker compose no longer loads the project's .env file automatically. If you rely on .env, list it here.
Hosts
Hostnames that should resolve to your machine. orca hosts adds every host from every project in the workspace to /etc/hosts, pointing at 127.0.0.1. See Hosts & TLS.
TLS certificates
Domains (wildcards allowed) to generate certificates for, signed by orca's local certificate authority. Quote wildcards, as YAML treats a leading * specially. Services can have the certificates mounted with the TLS injection overlay. See Hosts & TLS.
Extensions
extensions:
- name: artisan
service: app
command: php artisan
defaultArgs:
- list
description: Run an artisan command
- name: env
type: syncFile
source: .env.example
target: .env
Named steps, each of a type: a command (in a service, or on your machine), a syncFile or a symlink. Paths are relative to the project's directory. Each type takes its own properties, and the config is invalid if an extension has one its type doesn't take.
See the extensions reference for every type and property, and Extensions for running them.
Hooks
The extensions to run around an operation, by name, keyed by the operation, then pre or post. Every project can have clone.post, up.pre, up.post, down.pre and down.post, the workspace repository's own included, and a library only clone.post. Each entry's extension must be defined in this config: a project can't run another's.
See Hooks.