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:
@@ -143,13 +143,15 @@ In the shared project (`ai-stack-portal`), add these **project-level environment
|
||||
|
||||
The portal's docker-compose files use Dokploy's variable syntax to reference these:
|
||||
|
||||
```yaml
|
||||
environment:
|
||||
- SHARED_PROJECT_ID=${{project.SHARED_PROJECT_ID}}
|
||||
- SHARED_ENVIRONMENT_ID=${{project.SHARED_ENVIRONMENT_ID}}
|
||||
```
|
||||
```yaml
|
||||
environment:
|
||||
- SHARED_PROJECT_ID=$${{project.SHARED_PROJECT_ID}}
|
||||
- SHARED_ENVIRONMENT_ID=$${{project.SHARED_ENVIRONMENT_ID}}
|
||||
```
|
||||
|
||||
**This syntax `${{project.VARIABLE}}` tells Dokploy**: "Get this value from the project-level environment variables"
|
||||
**This syntax `$${{project.VARIABLE}}` tells Dokploy**: "Get this value from the project-level environment variables"
|
||||
|
||||
**Note**: The double `$$` is required to escape the dollar sign in Docker Compose files.
|
||||
|
||||
### Important Notes
|
||||
|
||||
|
||||
Reference in New Issue
Block a user