Skip to content

feat: add SaaS deployment for cowork.mindshub.ai#139

Draft
pnewsam wants to merge 2 commits into
stagingfrom
feat/cowork-saas-deployment
Draft

feat: add SaaS deployment for cowork.mindshub.ai#139
pnewsam wants to merge 2 commits into
stagingfrom
feat/cowork-saas-deployment

Conversation

@pnewsam

@pnewsam pnewsam commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fix web-main.tsx auth detection so *.mindshub.ai hosts use Keycloak auth (instead of skipping it, which is only appropriate for Cloudflare Worker-gated Lightsail instances)
  • Add per-environment .env files for Vite builds (dev/staging/production) with correct Keycloak and API URLs
  • Add APP_ENV build arg to Dockerfile for env-aware SPA builds
  • Add Helm chart (deployment/cowork/) with per-env ingress values for cowork.{dev,staging,prod}.mindshub.ai
  • Add GitHub workflows for dev (PR label), staging (push to main), and prod (release) K8s deployments

Prerequisite infra work before first deploy

  • Create ECR repository cowork in 168681354662.dkr.ecr.us-east-1.amazonaws.com
  • Update Keycloak redirect URIs + web origins for cowork.*.mindshub.ai in auth/deployment/keycloak-config-cli/values-<env>.yaml
  • Verify DNS records exist (likely covered by *.mindshub.ai wildcard)
  • Ensure GitHub environments (staging, dev, prod) have required secrets/variables

Test plan

  • Deploy to dev via PR label deploy-to-dev and verify cowork.dev.mindshub.ai loads
  • Verify Keycloak login flow works (redirects, token refresh)
  • Verify existing Lightsail cloud instances (cw-*.4nton.ai) still skip Keycloak
  • Verify npm run dev:web localhost still works with Keycloak

🤖 Generated with Claude Code

Add Kubernetes deployment infrastructure for serving Cowork as a SaaS
app at cowork.{dev,staging,prod}.mindshub.ai, mirroring the
mindshub_frontend (console) deployment pattern.

- Fix web-main.tsx auth detection: *.mindshub.ai hosts now use Keycloak
  instead of skipping auth (which was only appropriate for Cloudflare
  Worker-gated Lightsail instances)
- Add per-environment .env files for Vite builds (dev/staging/production)
- Add APP_ENV build arg to Dockerfile for env-aware SPA builds
- Add Helm chart (deployment/cowork/) with per-env values
- Add GitHub workflows for dev/staging/prod K8s deployments

Prerequisite infra work before first deploy:
- Create ECR repository "cowork"
- Update Keycloak redirect URIs for cowork.*.mindshub.ai
- Ensure DNS records exist (likely covered by *.mindshub.ai wildcard)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Comment thread .github/workflows/dev-build-deploy-k8s.yml Fixed
Comment thread .github/workflows/dev-build-deploy-k8s.yml Fixed
Comment thread .github/workflows/dev-build-deploy-k8s.yml Fixed
Comment thread .github/workflows/dev-build-deploy-k8s.yml Fixed
Comment thread .github/workflows/prod-build-deploy-k8s.yml Fixed
Comment thread .github/workflows/prod-build-deploy-k8s.yml Fixed
Comment thread .github/workflows/prod-build-deploy-k8s.yml Fixed
Comment thread .github/workflows/staging-build-deploy-k8s.yml Fixed
Comment thread .github/workflows/staging-build-deploy-k8s.yml Fixed
Comment thread .github/workflows/staging-build-deploy-k8s.yml Fixed
Address CodeQL findings — restrict GITHUB_TOKEN to contents:read
in all three K8s deployment workflows.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@pnewsam pnewsam changed the base branch from main to staging June 17, 2026 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants