Changed from ${{project.VAR}} to ${VAR} syntax.
The ${{project.VAR}} syntax is for Dokploy's Environment editor UI,
not for docker-compose.yml files. Docker Compose requires standard
${VAR} syntax to read from .env file.
The .env file (managed by Dokploy) already contains the actual values.
Problem: Commit c2c188f (docker ports removed) accidentally reverted the
dollar sign escape fix from commit dd063d5.
Evidence:
- git show dd063d5:docker-compose.dev.yml shows: $${{project.SHARED_PROJECT_ID}} ✅
- Current docker-compose.dev.yml has: ${{project.SHARED_PROJECT_ID}} ❌
- Dokploy error log shows: 'You may need to escape any $ with another $'
- staging.yml and prod.yml still have correct $$ (lines 16-17)
Root Cause:
Manual edit in c2c188f modified docker-compose files and accidentally
removed one dollar sign during the 'docker ports removed' change.
Solution:
Re-applied dollar sign escape: $ → $$ on lines 14-15
Verification:
- grep "SHARED_PROJECT_ID" docker-compose.*.yml shows all have $${{
- docker-compose.dev.yml now matches staging.yml and prod.yml
This will fix the Dokploy deployment error.
Docker Compose interprets $ as variable substitution, so we need to escape
Dokploy's project-level variable syntax by doubling the dollar sign.
Changes:
- docker-compose.*.yml: ${{project.VAR}} → $${{project.VAR}}
- Updated DOKPLOY_DEPLOYMENT.md with correct syntax and explanation
- Updated SHARED_PROJECT_DEPLOYMENT.md with correct syntax and explanation
This fixes the 'You may need to escape any $ with another $' error when
deploying via Dokploy.
Evidence: Tested in Dokploy deployment - error resolved with $$ escaping.
- Add SHARED_PROJECT_ID and SHARED_ENVIRONMENT_ID to all docker-compose files
- Use Dokploy's project-level variable syntax: ${{project.VARIABLE}}
- Deploy all user AI stacks to a single shared Dokploy project
- Update DOKPLOY_DEPLOYMENT.md with shared project configuration guide
- Add comprehensive SHARED_PROJECT_DEPLOYMENT.md architecture documentation
Benefits:
- Centralized management (all stacks in one project)
- Resource efficiency (no per-user project overhead)
- Simplified configuration (project-level shared vars)
- Better organization (500 apps in 1 project vs 500 projects)
How it works:
1. Portal reads SHARED_PROJECT_ID from environment
2. Docker-compose uses ${{project.SHARED_PROJECT_ID}} to reference project-level vars
3. Dokploy resolves these at runtime
4. Portal deploys user stacks as applications within the shared project
Fallback: If variables not set, falls back to legacy behavior (separate project per user)