Commit Graph
14 Commits
Author SHA1 Message Date
mohmdsdgandCursor d5dfd6a0f0 Ship prebuilt Prisma client so the server never runs prisma generate
prisma generate needs over three minutes on the production host, which made
every deploy hang on that build step. The client is now generated on the dev
machine into prisma-client.tar.gz (tracked, 8.5MB) and the image just untars
it. Dropping the unused linux-musl engine target halves that payload.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-08 16:35:06 +03:30
mohmdsdgandCursor aa9b3ee451 Cache prisma generate layer so routine deploys rebuild only dist
prisma generate takes ~110s on the production host and it sat after COPY dist,
so every deploy paid for it. Moving schema copy and generate ahead of dist
means a code-only deploy reuses that layer and finishes in seconds.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-08 16:22:45 +03:30
mohmdsdgandCursor 811f671e78 Restore git-pull-only deploy: single compose path with schema from git
Deploy is back to the flow that worked: build dist locally, push, then on the
server only `git pull` + `docker compose up -d --build`. The Dockerfile now
also takes prisma/ and package.json from git and runs `prisma generate`, so
schema and migration changes ship without rebuilding the 120MB node_modules
bundle. Removes the prebuilt compose path, which could never work on a server
without npm.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-08 16:14:53 +03:30
mohmdsdgandCursor 345a4a4708 Add SMS OTP, harden auth, and fix order/checkout server bugs.
Ship 4-digit OTP with rate-limit attempts, Tehran-safe expiry/rass math, larger JSON body limit for check images, and safer order pricing/status guards. Include rebuilt dist for prebuilt deploy.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-08 14:55:26 +03:30
mohmdsdgandCursor b121797263 Support LiteSpeed /server path via GLOBAL_PREFIX
Allow Nest prefix server/api and overlay dist from git onto the deploy bundle so proxy paths match without a full retar.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-06 09:55:57 +03:30
mohmdsdgandCursor 85900f649c Use full node:22-bookworm image so OpenSSL is available without apt
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 22:11:34 +03:30
mohmdsdgandCursor fd98ffb7a3 Skip apt-get in Dockerfile for servers blocked from Debian mirrors
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 22:07:34 +03:30
mohmdsdgandCursor fe324936c8 Fix Prisma runtime by switching API image to Debian slim
Alpine musl is incompatible with host-built Prisma engines; use bookworm-slim and allow updating entrypoint without repacking the bundle.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 22:04:27 +03:30
mohmdsdgandCursor 6ed952cc5d Extract deploy bundle inside Dockerfile so server needs no tar command
Server workflow is only git pull and docker compose up --build; env still comes from .env.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 22:00:15 +03:30
mohmdsdgandCursor ad236b7357 Switch npm mirror to npmmirror after IranServer 404s
IranServer npm mirror lacks packages; use registry.npmmirror.com which matches npmjs URL layout for lockfile rewrites.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 21:00:13 +03:30
mohmdsdgandCursor 5e973d7f2c Use Iranian npm mirror and rewrite package-lock URLs
npm ci ignores registry config when lockfile points at registry.npmjs.org; rewrite resolved URLs to mirror.iranserver.com before install.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 20:54:35 +03:30
mohmdsdgandCursor 5ed1b83457 Fix npm registry ARG so builds use npmmirror by default
ARG after FROM was empty without an explicit default, so npm ci hit the slow/blocked official registry.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 20:49:49 +03:30
mohmdsdgandCursor 9a9566dd50 Fix Docker build for restricted Alpine CDN access
Drop apk openssl (node alpine already has it) and use npmmirror by default so Iranian servers can build without Alpine TLS failures.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 20:37:59 +03:30
mohmdsdgandCursor 9f0422c1db Add NestJS fabric trade API with Prisma and Docker
Provide backend for admin and user apps with Postgres, migrations, seed data, and docker-compose for LiteSpeed reverse-proxy deployment.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 20:26:39 +03:30