-
-
Notifications
You must be signed in to change notification settings - Fork 1
Compose Profiles
profiles: in a compose.yml service marks it as opt-in — real Compose only starts it when you
activate the profile with --profile. wip has no --profile flag, so profile-gated services
are parsed, validated, and then skipped.
services:
app:
image: myapp:dev
db:
image: postgres:16
mailcatcher:
image: sj26/mailcatcher
profiles: [dev-tools]
seed:
image: myapp:dev
command: bundle exec rails db:seed
profiles: [tools]wip up -d # starts db and app. mailcatcher and seed are ignored.Profile-gated services are:
- parsed and validated like any other — an unsupported key in one is still an error
- included in
depends_onvalidation and cycle detection -
excluded from
wip up,wip stop,wip down, andwip up --watch -
excluded from image builds (a profile-gated service with
build:is never built) -
absent from
wip config'sdependencies:output
This matches what real Compose does with an unactivated profile: the service exists in the model but isn't part of the run.
profiles: must be an array of strings:
compose.yml: services.mailcatcher.profiles must be an array of strings
The primary service is the one thing wip always starts, so pointing compose.service at a
profile-gated service is rejected up front rather than failing later with a confusing "no matching
service" message:
compose.service 'seed' is gated behind profiles: in compose.yml, but wip has no --profile flag
to activate one — pick a service with no profiles: or remove profiles: from it
services:
app:
depends_on: [mailcatcher]
mailcatcher:
profiles: [dev-tools]compose.yml: services.app depends_on 'mailcatcher', gated behind profiles: (dev-tools) wip
never activates (no --profile flag)
Real Compose treats this as an invalid model too, since the dependency would never start. A gated service depending on another gated service is fine — neither runs.
If your compose file uses profiles heavily, you have three options:
- Leave them. Gated services are simply skipped, which is usually what you want in a dev container workflow — they exist for CI, seeding, or one-off tooling.
-
Run the gated thing yourself. Since it isn't managed by wip, use
wslc rundirectly, or add an interaction withtype: run:interaction: seed: type: run command: bundle exec rails db:seed
-
Use
mode: compose. The external tool has its own--profilesupport, and wip just bridges to it.
Introduction
Modes
Configuration
- Configuration Reference
- Config File Discovery
- Dependencies
- Networking
- Interactions
- Restart Policies
- Env Files
- Secret Masking
- Dockerignore
- Shadow Build Context
- Source Sync
- Sync Modes
compose.yml support
- Compose File Support
- Compose Build
- Compose Depends On
- Compose Profiles
- Compose Variable Interpolation
Commands
- CLI Command Reference
- wip init
- wip version
- wip doctor
- wip config
- wip build
- wip up
- wip stop
- wip down
- wip exec
- wip run
- wip shell
- wip logs
- wip sync
- wip dispatch
- Global Options
- Debug Output
- TTY Allocation
Guides
- Guides
- Migrating from dip
- Reusing an Existing compose.yml
- Fixing a Slow Boot
- Continuous Sync
- Auto Restarting Containers
- Multi Arch Images
- Using wip in CI
Troubleshooting
- Troubleshooting & FAQ
- FAQ
- Configuration Errors
- WSLC Not Found
- Registry Authentication
- Architecture Mismatch
- Volume Limit Reached
- rsync Not Found
- Reporting Issues
Comparison
Project