6 Commits

Author SHA1 Message Date
Oussama Douhou
8c8536f668 fix: Use standard Docker Compose variable syntax
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.
2026-01-13 16:19:44 +01:00
Oussama Douhou
db3a86404a fix: Use single dollar for Dokploy variable substitution
Official Dokploy docs specify ${{project.VAR}} (single $), not $${{project.VAR}}.
Double $$ is Docker Compose escape syntax preventing Dokploy substitution.

Caused missing SHARED_PROJECT_ID/SHARED_ENVIRONMENT_ID in portal container.

Ref: https://docs.dokploy.com/docs/core/variables
2026-01-13 16:17:13 +01:00
Oussama Douhou
c2c188f09f docker ports removed 2026-01-13 13:32:46 +01:00
Oussama Douhou
dd063d5ac5 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.
2026-01-13 13:12:06 +01:00
Oussama Douhou
9a593b8b7c feat: add shared project deployment with Dokploy project-level variables
- 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)
2026-01-13 12:01:59 +01:00
Oussama Douhou
10ed0e46d8 feat: add multi-environment deployment with Gitea Actions & Dokploy
- Update Gitea workflow to build dev/staging/main branches
- Create environment-specific docker-compose files
  - docker-compose.dev.yml (pulls dev image)
  - docker-compose.staging.yml (pulls staging image)
  - docker-compose.prod.yml (pulls latest image)
  - docker-compose.local.yml (builds locally for development)
- Remove generic docker-compose.yml (replaced by env-specific files)
- Update .dockerignore to exclude docs/ and .gitea/ from production images
- Add comprehensive deployment guide (docs/DOKPLOY_DEPLOYMENT.md)

Image Tags:
- dev branch → :dev
- staging branch → :staging
- main branch → :latest
- All branches → :{branch}-{sha}

Benefits:
- Separate deployments for dev/staging/prod
- Automated CI/CD via Gitea Actions + Dokploy webhooks
- Leaner production images (excludes dev tools/docs)
- Local development support (docker-compose.local.yml)
- Rollback support via SHA-tagged images
2026-01-13 11:51:48 +01:00