Commit Graph

42 Commits

Author SHA1 Message Date
Oussama Douhou
968dc74555 docs: add testing session 2026-01-13 findings
- Verified workflow separation and dollar sign escaping
- Retrieved shared project and environment IDs
- Tested local dev server health endpoint
- Documented Dokploy API token blocker (returns Forbidden)
- Added commands for resolving token issue
- Updated environment configuration requirements
2026-01-13 14:07:20 +01:00
Oussama Douhou
eb2745dd5a workflows changes 2026-01-13 13:48:42 +01:00
Oussama Douhou
1ff69f9328 fix: re-apply dollar sign escape in docker-compose.dev.yml
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.
2026-01-13 13:40:54 +01:00
Oussama Douhou
c2c188f09f docker ports removed 2026-01-13 13:32:46 +01:00
Oussama Douhou
254b7710d7 fix: add docker-compose files to workflow trigger paths
Problem: Commit dd063d5 modified docker-compose*.yml files but did NOT
trigger Gitea Actions build because docker-compose files were not in the
workflow's paths trigger list.

Evidence:
- git show --stat dd063d5 shows only docker-compose*.yml and docs/ changed
- .gitea/workflows/docker-publish.yaml paths did not include docker-compose*.yml
- Gitea Actions did not run after push (verified by user)

Solution:
Added 'docker-compose*.yml' to workflow paths trigger list.

Justification:
Docker-compose files are deployment configuration that should trigger
image rebuilds when changed. This ensures Dokploy applications always
pull images with the latest docker-compose configurations.

Testing:
This commit will trigger a build because it modifies .gitea/workflows/**
(which is in the paths list). Future docker-compose changes will also trigger.
2026-01-13 13:24:36 +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
Oussama Douhou
55378f74e0 fix: Docker build AVX issue with Node.js/Bun hybrid strategy
- Switch build stage from Bun to Node.js to avoid AVX CPU requirement
- Use Node.js 20 Alpine for building React client (Vite)
- Keep Bun runtime for API server (no AVX needed for runtime)
- Update README.md with build strategy and troubleshooting
- Update CLAUDE.md with Docker architecture documentation
- Add comprehensive docs/DOCKER_BUILD_FIX.md with technical details

Fixes #14 - Docker build crashes with "CPU lacks AVX support"

Tested:
- Docker build: SUCCESS
- Container runtime: SUCCESS
- Health check: PASS
- React client serving: PASS
2026-01-13 11:42:15 +01:00
Oussama Douhou
5c7522bf1d Add branching strategy documentation
- Create BRANCHING_STRATEGY.md with Git Flow workflow
- Update README.md with branching overview
- Document dev → staging → main flow
- Include PR guidelines and best practices
- Add emergency procedures and rollback instructions
2026-01-13 11:10:58 +01:00
Oussama Douhou
3657bc61f5 Complete React migration with WebGL design and comprehensive testing
- Add missing dependencies: react-router-dom, framer-motion, three, @react-three/fiber, clsx, tailwind-merge
- Add TEST_PLAN.md with 50+ test cases across 5 phases
- Add TEST_RESULTS.md with 100% pass rate documentation
- Remove unused kopia-compose.yaml

Features:
- WebGL dot matrix background with glassmorphism UI
- Full i18n support (EN/NL/AR with RTL)
- Code-split Three.js (68% bundle size reduction)
- All functionality preserved (validation, SSE, error handling)
- Docker build tested and passing

Status: Production-ready
2026-01-13 11:08:57 +01:00
Oussama Douhou
8977a6fdee New design v0.2
New design and framework
2026-01-13 10:49:47 +01:00
Oussama Douhou
21161c6554 feat: deploy all stacks to shared ai-stack-portal project
- Add SHARED_PROJECT_ID and SHARED_ENVIRONMENT_ID env vars
- Add findApplicationByName to Dokploy client for app-based lookup
- Update production-deployer to use shared project instead of creating new ones
- Update name availability check to query apps in shared environment
- Update delete endpoint to remove apps from shared project
- Rollback no longer deletes shared project (only app/domain)
- Backward compatible: falls back to per-project if env vars not set
2026-01-11 01:05:14 +01:00
Oussama Douhou
4750db265d feat(og): switch to v3 geometric design with CTA 2026-01-11 00:44:10 +01:00
Oussama Douhou
5e9fd91a42 feat(og): update OG image with CTA design v5 2026-01-11 00:39:03 +01:00
Oussama Douhou
6aa6307d0e fix: add static file routes for OG image and favicons 2026-01-10 23:57:15 +01:00
Oussama Douhou
897a8281a7 feat(seo): add Dutch metadata, social previews, and JSON-LD
- Update all meta tags to Dutch (nl_NL locale)
- Add Open Graph and Twitter Card tags with image alt text
- Add JSON-LD structured data (WebApplication schema)
- Add favicon assets (svg, ico, png, apple-touch-icon)
- Add social preview image (og-image.png, 1200x630)
- Update theme color to #560fd9
2026-01-10 23:35:01 +01:00
Oussama Douhou
e0b09bc5c0 docs: add ttyd dual-interface plan to TUI roadmap
Plan to expose both OpenCode IDE (port 8080) and raw ttyd terminal
(port 7681) for direct TUI access in browser.
2026-01-10 22:55:07 +01:00
Oussama Douhou
2fcf4d6bd4 docs: update TUI support progress in roadmap 2026-01-10 22:45:01 +01:00
Oussama Douhou
95b6c0a53b feat: add TUI environment variables to stack deployments
- Pass TERM=xterm-256color for 256-color terminal support
- Pass COLORTERM=truecolor for 24-bit color support
- Pass LANG and LC_ALL for proper Unicode rendering
- Update ROADMAP.md with TUI feature planning and cleanup automation
2026-01-10 22:38:00 +01:00
Oussama Douhou
3d056f1348 refactor: update default stack image to flexinit/agent-stack
Replace oh-my-opencode-free references with the new consolidated
flexinit/agent-stack image in source code and documentation.
2026-01-10 22:10:21 +01:00
Oussama Douhou
402d225979 Header title 2026-01-10 15:45:58 +01:00
Oussama Douhou
15f0fa2f27 Homepage title 2026-01-10 14:45:49 +01:00
Oussama Douhou
8b1556c034 docs: add Gitea Actions workflow status checking documentation
- Add API endpoint and curl commands to check CI status
- Document authentication with Authorization: token header
- Add response field descriptions (status, conclusion)
- Reference BWS key for GITEA_API_TOKEN
2026-01-10 14:38:53 +01:00
Oussama Douhou
f5f10ed6c4 feat(logging): finalize log-ingest service for dokploy-network deployment
- Update log-ingest to use internal Loki endpoint
- Add standalone docker-compose for dokploy deployment
- Update ROADMAP and LOGGING-PLAN with completed status
- Configure proper network settings for dokploy-network
2026-01-10 14:19:42 +01:00
Oussama Douhou
80e54ce578 docs: add logging infrastructure section to CLAUDE.md 2026-01-10 14:17:31 +01:00
Oussama Douhou
f2cb76b65d your-mom 2026-01-10 13:28:14 +01:00
Oussama Douhou
2f4722acd0 feat: add comprehensive logging infrastructure
- Add Loki/Prometheus/Grafana stack in logging-stack/
- Add log-ingest service for receiving events from AI stacks
- Add Grafana dashboard with stack_name filtering
- Update Dokploy client with setApplicationEnv method
- Configure STACK_NAME env var for deployed stacks
- Add alerting rules for stack health monitoring
2026-01-10 13:22:46 +01:00
Oussama Douhou
e617114310 refactor: enterprise-grade project structure
- Move test files to tests/
- Archive session notes to docs/archive/
- Remove temp/diagnostic files
- Clean src/ to only contain production code
2026-01-10 12:32:54 +01:00
Oussama Douhou
b83f253582 chore: remove redundant START-HERE.md (use README.md) 2026-01-10 12:29:03 +01:00
Oussama Douhou
1cdb1d813b docs: add ROADMAP.md 2026-01-10 12:27:41 +01:00
Oussama Douhou
d40186e5f8 fix: add 15s delay for SSL certificate provisioning after Dokploy deploy 2026-01-10 12:06:23 +01:00
Oussama Douhou
7aa27f75e2 fix: improve language button styling for text labels 2026-01-10 12:03:37 +01:00
Oussama Douhou
2ab1c595df docs: update TESTING.md with UI/UX fixes verification 2026-01-10 12:00:14 +01:00
Oussama Douhou
7e95e9f310 fix: use Dokploy API status check instead of HTTP health check
The portal container cannot reach deployed stacks via external URL.
Now checks applicationStatus via Dokploy API instead.
2026-01-10 11:56:15 +01:00
Oussama Douhou
9f2ee66f19 fix: remove resource limits temporarily (Dokploy API format issues) 2026-01-10 11:49:37 +01:00
Oussama Douhou
f43f784ad4 fix: use string values for memory/CPU limits (Dokploy API requirement) 2026-01-10 11:45:29 +01:00
Oussama Douhou
67069f3bda fix: resolve 4 UI/UX issues
1. Fix typewriter double-letter bug (race condition)
2. Replace flag emojis with text labels (NL/AR/EN)
3. Fix health check TLS options for Bun compatibility
4. Translate 'yourname' placeholder per language
2026-01-10 11:39:14 +01:00
Oussama Douhou
fe8abda7d3 fix: add registryId for private container registry authentication 2026-01-10 10:19:05 +01:00
Oussama Douhou
2f306f7d68 feat: production-ready deployment with multi-language UI
- Add multi-language support (NL, AR, EN) with RTL
- Improve health checks (SSL-tolerant, multi-endpoint)
- Add DELETE /api/stack/:name for cleanup
- Add persistent storage (portal-ai-workspace-{name})
- Improve rollback (delete domain, app, project)
- Increase SSE timeout to 255s
- Add deployment strategy documentation
2026-01-10 09:56:33 +01:00
Oussama Douhou
eb6d5142ca feat: add CI/CD workflow and update documentation
- Add .gitea/workflows/docker-publish.yaml for automated builds
- Configure workflow to trigger on main branch
- Update README.md with deployment instructions
- Update START-HERE.md with session context

This enables automatic Docker image builds tagged as :latest and :<sha>
when pushing to main branch.
2026-01-09 23:44:02 +01:00
Oussama Douhou
19845880e3 fix(ci): trigger workflow on main branch to enable :latest tag
Changes:
- Create Gitea workflow for ai-stack-deployer
- Trigger on main branch (default branch)
- Use oussamadouhou + REGISTRY_TOKEN for authentication
- Build from ./Dockerfile

This enables :latest tag creation via {{is_default_branch}}.

Tags created:
- git.app.flexinit.nl/oussamadouhou/ai-stack-deployer:latest
- git.app.flexinit.nl/oussamadouhou/ai-stack-deployer:<sha>

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-09 23:33:39 +01:00