Configuration Tree Structure
The configuration follows a three-level hierarchy:File Discovery
Applad discovers your configuration automatically:- Organizations: Any directory under
orgs/containing anorg.yamlfile is treated as an organization - Projects: Any subdirectory within an organization containing a
project.yamlfile is treated as a project - No explicit listing: The directory structure IS the config — no manifest files required
The presence of
org.yaml and project.yaml files is what defines organizations and projects. You don’t need to register them anywhere else.Merge Behavior
Applad merges the full configuration tree at startup:- Instance-level settings from
applad.yamlapply globally - Organization-level settings from
org.yamlcan extend or override instance settings - Project-level settings from
project.yamlhave the highest precedence
Environment Overrides
Many configuration files supportenvironment_overrides blocks that allow per-environment customization:
Environment Override Resolution
Environment Override Resolution
When
applad up runs for a specific environment:- Base configuration is loaded first
- Environment-specific overrides are deep-merged on top
- Environment variables are resolved at merge time
- The final merged config is used to synthesize Docker Compose or cloud resources
Environment Variables
Configuration files use${VARIABLE_NAME} syntax to reference environment variables:
Auto-Generated .env.example
Applad automatically generates.env.example files at each level:
- Instance:
applad.yaml→.env.example - Organization:
org.yaml→orgs/<org-name>/.env.example - Project:
project.yaml→orgs/<org-name>/<project-name>/.env.example
- Which config file references each variable
- Whether the variable is a secret (should use
applad secrets set) - Format hints and generation commands
Run
applad env generate to regenerate .env.example files. Copy to .env and fill in values.Configuration Validation
Applad validates your configuration on everyapplad up run:
- Schema validation: Ensures all required fields are present and correctly typed
- Cross-reference validation: Warns about broken references (e.g., a function referencing a non-existent table)
- Cross-database detection: Flags table relations that span different database connections
- Permission conflicts: Checks for overlapping or contradictory permission rules
Lock File
After the first successfulapplad up, a applad.lock file is generated at the instance root. This file:
- Records the exact configuration that was deployed
- Includes resolved environment variable values (encrypted)
- Enables deterministic deployments
- Should be committed to version control
Common Patterns
Multiple Environments
Define environments inproject.yaml with different infrastructure targets:
Shared Configuration
Use theshared/ directory at the instance root for reusable configuration:
Reference shared config using relative paths:
import: "../../shared/roles/default-roles.yaml"Next Steps
Instance Config
Configure your Applad instance with
applad.yamlOrganizations
Set up organizations, roles, and permissions
Projects
Define projects and environments
Environments
Configure environment-specific overrides