Commit Graph
20 Commits
Author SHA1 Message Date
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 8cedf9f082 Add deploy-bundle.tar.gz for git-based server deploy
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>
2026-08-05 21:51:28 +03:30
mohmdsdgandCursor d2e385d1f9 Fix pack-bundle prisma generate with DATABASE_URL
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 21:49:02 +03:30
mohmdsdgandCursor b620dd0015 Add offline deploy bundle with dist and production node_modules
Allow shipping a tarball so the server Docker image only copies files and never runs npm.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 21:43:59 +03:30
mohmdsdgandCursor 44f030bc06 Clean tsbuildinfo before nest build to avoid empty dist
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 21:38:33 +03:30
mohmdsdgandCursor df765c9296 Fix local dist build by clearing incremental cache before nest build
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>
2026-08-05 21:38:22 +03:30
mohmdsdgandCursor cbcea58e94 Deploy via committed dist: local Nest build, server runs with .env
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>
2026-08-05 21:35:22 +03:30
mohmdsdgandCursor 67cfc17079 Align main compose with server .env env_file loading
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 21:29:32 +03:30
mohmdsdgandCursor 1b249e0b57 Load runtime config from server .env via compose env_file
Keep secrets out of the image; only override DATABASE_URL host for the Docker network.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 21:29:21 +03:30
mohmdsdgandCursor 1fdbae1791 Add local Docker image build and export for server deploy
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>
2026-08-05 21:28:35 +03:30
mohmdsdgandCursor 81d0571d72 Speed up deploy by using portable Node on host disk
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>
2026-08-05 21:27:41 +03:30
mohmdsdgandCursor 1fe99fd688 Pull Node image via IranServer Docker mirror by default
Avoid slow/blocked docker.io pulls when running deploy-host-build.sh.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 21:20:29 +03:30
mohmdsdgandCursor 68f0d45adf Build with temporary Node container so host Node is not required
Use docker run node:22-alpine for npm ci/build, then package via Dockerfile.prebuilt.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 21:19:21 +03:30
mohmdsdgandCursor 56afc032d2 Add host-build deploy path for slow Docker npm installs
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>
2026-08-05 21:17:44 +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