Tell the user no account exists and to register, instead of a bare
"user not found" string on the login OTP request path.
Co-authored-by: Cursor <cursoragent@cursor.com>
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>
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>
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>
npx can stall checking the registry on restricted networks; migrate never finished so the API never started.
Co-authored-by: Cursor <cursoragent@cursor.com>
Alpine lacked OpenSSL so Prisma migrate hung and Nest never started; also restore env_file so GLOBAL_PREFIX and SMS settings reach the API.
Co-authored-by: Cursor <cursoragent@cursor.com>
Dockerfile.prebuilt needs package.json, prisma, and node_modules in the build context; the previous ignore whitelist blocked them.
Co-authored-by: Cursor <cursoragent@cursor.com>
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>
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>
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>
Ship prebuilt dist and production node_modules so the server only pulls and extracts, without npm or scp.
Co-authored-by: Cursor <cursoragent@cursor.com>
Nest deleteOutDir plus stale tsbuildinfo left an empty dist; force clean tsc emit and commit the rebuilt output.
Co-authored-by: Cursor <cursoragent@cursor.com>
Build on the developer machine without Docker, commit dist/, and run on the server with Dockerfile.dist plus compose env_file.
Co-authored-by: Cursor <cursoragent@cursor.com>
Build and gzip the API image on a machine with good network, then docker load on the server without remote npm builds.
Co-authored-by: Cursor <cursoragent@cursor.com>
Avoid slow npm installs over Docker bind mounts; download Node from npmmirror and build on the server filesystem.
Co-authored-by: Cursor <cursoragent@cursor.com>
Install and build on the server host with npmmirror, then package a slim image without network during docker build.
Co-authored-by: Cursor <cursoragent@cursor.com>
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>
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>
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>
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>