fix(coolify): use environment map syntax for Coolify v4 parser#424
fix(coolify): use environment map syntax for Coolify v4 parser#424healdigital wants to merge 1 commit into
Conversation
Coolify v4's PHP-based docker-compose validator rejects the shorthand
environment list syntax ('- VAR' without =) with:
Error: non-string key in services.agentmemory.environment: 0
Switching to the map form with explicit variable substitution preserves
the original 'inherit from build env' behavior — Coolify still resolves
SERVICE_FQDN_AGENTMEMORY_3111 from the magic variable mechanism — while
satisfying the stricter parser.
Verified with:
SERVICE_FQDN_AGENTMEMORY_3111=https://example.com \
docker compose -f deploy/coolify/docker-compose.yml \
--project-directory deploy/coolify config
Tested live on a Coolify v4.0.0-beta.397 instance: deploy succeeds and
container reaches running:healthy on first try with this change.
|
@healdigital is attempting to deploy a commit to the rohitg00's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe ChangesDocker Compose Configuration Syntax
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Coolify v4's PHP-based docker-compose validator rejects the shorthand environment list syntax (
- VARwithout=) indeploy/coolify/docker-compose.yml, breaking the official one-click deploy flow.The exact build error is:
This happens because Coolify's parser converts the YAML list into a PHP array with numeric indices (
0 => "SERVICE_FQDN_AGENTMEMORY_3111"), then fails its "all environment keys must be strings" assertion.Fix
Switch to the equivalent map form with explicit
${VAR}substitution:This preserves the original "inherit from build env" semantics — Coolify still resolves
SERVICE_FQDN_AGENTMEMORY_3111through its magic-variable mechanism — while satisfying the stricter parser.Verification
Locally with Docker Compose v2:
SERVICE_FQDN_AGENTMEMORY_3111=https://example.com \ docker compose -f deploy/coolify/docker-compose.yml \ --project-directory deploy/coolify configOutput shows
SERVICE_FQDN_AGENTMEMORY_3111: https://example.comcorrectly substituted.End-to-end test on a Coolify v4.0.0-beta.397 instance:
running:healthyon first try,/agentmemory/livezreturns{"service":"agentmemory","status":"ok"}over HTTPS via Traefik.Notes
Test plan
docker compose -f deploy/coolify/docker-compose.yml --project-directory deploy/coolify configresolves withSERVICE_FQDN_AGENTMEMORY_3111setSummary by CodeRabbit