Knowledge
Search knowledge... ⌘K
Knowledge · Guidelines · docker
Service Binding
How to connect infrastructure services to workspace projects
Metadata
docker docker recommended
Procedures
Showing 3 of 4
- 1 Define service in workspace infrastructure YAML
Each infrastructure service has a YAML definition in .sbx/workspace/infrastructure/services/
# .sbx/workspace/infrastructure/services/postgres.yml type: service name: postgres provider: internal technology: postgresql
- 2 Add project allocation to service definition
Each project using the service gets an allocation entry with database, schema, and user
allocations: sbx: database: shredbx schema: sbx user: sbx - 3 Use ConnectionConfig for programmatic access
Go code reads service connections via pkg/infraservice types, not raw config files
svc, err := infraservice.LoadService("postgres", root) config := svc.Allocations["sbx"]
Tools
- SBX infraservice package
- Docker Compose