fix: escape dollar signs in Dokploy project-level variables

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.
This commit is contained in:
Oussama Douhou
2026-01-13 13:12:06 +01:00
parent 9a593b8b7c
commit dd063d5ac5
5 changed files with 19 additions and 15 deletions

View File

@@ -17,7 +17,7 @@ The AI Stack Deployer portal deploys **all user AI stacks to a single shared Dok
│ 📦 Portal Application: ai-stack-deployer-prod │
│ ├─ Domain: portal.ai.flexinit.nl │
│ ├─ Image: git.app.flexinit.nl/.../ai-stack-deployer:latest│
│ └─ Env: SHARED_PROJECT_ID=${{project.SHARED_PROJECT_ID}} │
│ └─ Env: SHARED_PROJECT_ID=$${{project.SHARED_PROJECT_ID}} │
│ │
│ ───────────────────────────────────────────────────────────── │
│ │
@@ -56,9 +56,11 @@ When a user submits a stack name (e.g., "john-dev"), the portal:
2. **These are set via Dokploy's project-level variables**:
```yaml
environment:
- SHARED_PROJECT_ID=${{project.SHARED_PROJECT_ID}}
- SHARED_ENVIRONMENT_ID=${{project.SHARED_ENVIRONMENT_ID}}
- SHARED_PROJECT_ID=$${{project.SHARED_PROJECT_ID}}
- SHARED_ENVIRONMENT_ID=$${{project.SHARED_ENVIRONMENT_ID}}
```
**Note**: The double `$$` is required to escape the dollar sign in Docker Compose.
### Step 2: Portal Deploys to Shared Project