From 7a1b2899319a0f2b0a050d1e11c69f801cd8e3a5 Mon Sep 17 00:00:00 2001 From: Fusion Date: Wed, 13 May 2026 12:05:58 +0000 Subject: [PATCH] feat(FN-317): remove legacy sase-web PM2 entry (+1 more) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commits merged: - docs(FN-317): complete Step 3 — update docs and memory for sase-web removal - feat(FN-317): complete Step 1 — remove legacy sase-web PM2 entry Files changed: .changeset/remove-pm2-sase-web.md | 9 +++++++++ .fusion/memory/MEMORY.md | 2 +- CLAUDE.md | 2 +- docs/INDEX.md | 8 +++----- ecosystem.config.js | 16 ---------------- knowledge.md | 3 +-- 6 files changed, 15 insertions(+), 25 deletions(-) Fusion-Task-Id: FN-317 --- .changeset/remove-pm2-sase-web.md | 9 +++++++++ .fusion/memory/MEMORY.md | 2 +- CLAUDE.md | 2 +- docs/INDEX.md | 8 +++----- ecosystem.config.js | 16 ---------------- knowledge.md | 3 +-- 6 files changed, 15 insertions(+), 25 deletions(-) create mode 100644 .changeset/remove-pm2-sase-web.md diff --git a/.changeset/remove-pm2-sase-web.md b/.changeset/remove-pm2-sase-web.md new file mode 100644 index 0000000..92d956e --- /dev/null +++ b/.changeset/remove-pm2-sase-web.md @@ -0,0 +1,9 @@ +--- +"sase": patch +--- + +**Removed:** `sase-web` entry from `ecosystem.config.js` + +Production web traffic is served via nginx static files from `apps/web/dist/` (configured in `docker/nginx/sites/sase.tr.conf`). The PM2 `pnpm dev` process on port 3000 was a legacy artifact with `NODE_ENV=development` — it was never in the production serving path. Current production deployment is Coolify-driven (Docker Compose), which builds a single image serving both API (port 4000) and static frontend assets via nginx. + +**Rationale:** Reduce PM2 process footprint, eliminate confusion about which process serves production traffic, and remove a long-running `NODE_ENV=development` process that consumed resources without serving any user traffic. diff --git a/.fusion/memory/MEMORY.md b/.fusion/memory/MEMORY.md index 20fd01d..d7b73ce 100644 --- a/.fusion/memory/MEMORY.md +++ b/.fusion/memory/MEMORY.md @@ -72,7 +72,7 @@ Highlights to remember: ## Context -- **Deploy:** Auto on push to `dev` (→ dev.sase.tr) and `main` (→ sase.tr). Both webhooks live on `git.semih.ai/root/sase.tr` and call Coolify's `/api/v1/deploy?uuid=...&force=true`. No PM2 / GitHub Actions in the loop anymore — the CLAUDE.md mention of `GitHub Actions → SSH → PM2` is historical; current deploy is Coolify-driven. +- **Deploy:** Auto on push to `dev` (→ dev.sase.tr) and `main` (→ sase.tr). Both webhooks live on `git.semih.ai/root/sase.tr` and call Coolify's `/api/v1/deploy?uuid=...&force=true`. No PM2 / GitHub Actions in the loop anymore — the CLAUDE.md mention of `GitHub Actions → SSH → PM2` is historical; current deploy is Coolify-driven. The legacy `sase-web` PM2 entry (`pnpm dev`, `NODE_ENV=development`, port 3000) was removed from `ecosystem.config.js` in FN-317 (May 2026). Production web traffic is served via nginx static files from `apps/web/dist/`; PM2 now manages only `sase-api` (port 4000) and `sase-worker`. Web dev on port 3000 remains for local development only (`pnpm dev --filter web`). - **Test admin user:** `admin@sase.tr` / `Sase2026`. Test VIN: `WVWZZZ1JZ3W597935` (VW). - **Critical-path bans on dev:** see team-charter.md. Migrations + dep/config changes still need human ack; auth/payments fixes are auto on dev with QA Lead regression test. - **Critical-path bans on main:** strict — auth/payments/billing/subscription/migrations all gated. diff --git a/CLAUDE.md b/CLAUDE.md index 8ea36d0..0de3727 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -57,7 +57,7 @@ ss/ ├── docker/ # docker-compose.yml (PostgreSQL, Redis, MinIO) + nginx configs ├── scripts/ # deploy.sh, test/debug scripts ├── docs/ # INDEX.md + detailed docs (00-13) -└── ecosystem.config.js # PM2 config (api, web, worker) +└── ecosystem.config.js # PM2 config (api, worker) ``` ## Key Commands diff --git a/docs/INDEX.md b/docs/INDEX.md index a5ecd4d..b69cf06 100644 --- a/docs/INDEX.md +++ b/docs/INDEX.md @@ -56,10 +56,9 @@ Generated: 2026-03-02 └─────────────┘ ``` -**Three runtime processes** managed by PM2: +**Two runtime processes** managed by PM2: 1. `sase-api` — NestJS API server (fork mode) -2. `sase-web` — Vite/React frontend (fork mode) -3. `sase-worker` — Background job processor (fork mode) +2. `sase-worker` — Background job processor (fork mode) --- @@ -160,7 +159,7 @@ sase.tr/ ├── docker/ # Docker Compose (PostgreSQL, Redis, MinIO, nginx) ├── scripts/ # Build/deployment/debug scripts ├── .github/workflows/ # CI (lint, typecheck, test, build) + Deploy (SSH, PM2) -├── ecosystem.config.js # PM2 process configuration +├── ecosystem.config.js # PM2 config (api, worker) ├── turbo.json # Turborepo task pipeline ├── biome.json # Linter/formatter config └── pnpm-workspace.yaml # Workspace root @@ -795,7 +794,6 @@ Dependencies: Radix UI (accordion, dialog, dropdown-menu, label, popover, select | Process | Command | Port | Memory | |---------|---------|------|--------| | `sase-api` | `pnpm dev` (dev) / `dist/main.js` (prod) | 4000 | 512MB | -| `sase-web` | `pnpm dev` (dev) / serve dist (prod) | 3000 | 512MB | | `sase-worker` | `dist/worker.js` | — | 256MB | --- diff --git a/ecosystem.config.js b/ecosystem.config.js index c8ef7bf..691cde0 100644 --- a/ecosystem.config.js +++ b/ecosystem.config.js @@ -18,22 +18,6 @@ module.exports = { merge_logs: true, log_date_format: "YYYY-MM-DD HH:mm:ss Z", }, - { - name: "sase-web", - cwd: "./apps/web", - script: "pnpm", - args: "dev", - exec_mode: "fork", - env: { - NODE_ENV: "development", - PORT: 3000, - }, - max_memory_restart: "512M", - error_file: "../../logs/web-error.log", - out_file: "../../logs/web-out.log", - merge_logs: true, - log_date_format: "YYYY-MM-DD HH:mm:ss Z", - }, { name: "sase-worker", cwd: "./apps/api", diff --git a/knowledge.md b/knowledge.md index b786494..7e0ac7f 100644 --- a/knowledge.md +++ b/knowledge.md @@ -133,7 +133,7 @@ ss/ (repo root) ├── docker/ # Docker Compose (PostgreSQL, Redis, MinIO, nginx) ├── scripts/ # Deploy, debug, keşif script'leri ├── .github/workflows/ # CI (lint+typecheck+test+build) + Deploy -├── ecosystem.config.js # PM2 process konfigürasyonu +├── ecosystem.config.js # PM2 konfigürasyonu (api, worker) ├── turbo.json # Turborepo pipeline ├── biome.json # Linter/formatter konfigürasyonu └── pnpm-workspace.yaml # Workspace kök @@ -1436,7 +1436,6 @@ Web URL: http://localhost:3000 | Süreç | Komut | Port | Max Bellek | |-------|-------|------|------------| | `sase-api` | `dist/main.js` | 4000 | 512MB | -| `sase-web` | serve dist | 3000 | 512MB | | `sase-worker` | `dist/worker.js` | — | 256MB | ### CI/CD (GitHub Actions)