[2026-06-06T03:41:46.314Z] [INFO] ====================================================== [2026-06-06T03:41:46.315Z] [INFO] DEPLOY INICIADO — v1.0.7 [2026-06-06T03:41:46.315Z] [INFO] Commit: 2b2909d7ced2c5f0c80c89123100fb18a7eb7728 [2026-06-06T03:41:46.315Z] [INFO] Mensagem: Deploy via CI (testes OK) [2026-06-06T03:41:46.315Z] [INFO] Branch: main [2026-06-06T03:41:46.315Z] [INFO] Disparado por: jhon4than (CI) [2026-06-06T03:41:46.315Z] [INFO] ====================================================== [2026-06-06T03:41:46.316Z] [INFO] Iniciando deploy: /www/wwwroot/saas_crm/scripts/deploy-zero-downtime.sh [2026-06-06T03:41:46.316Z] [INFO] PROJECT_PATH=/www/wwwroot/saas_crm [2026-06-06T03:41:46.350Z] [DEPLOY] ╔════════════════════════════════════════════════════════════╗ [2026-06-06T03:41:46.352Z] [DEPLOY] ║ ClickNex CRM - Zero Downtime Deployment ║ [2026-06-06T03:41:46.352Z] [DEPLOY] ╚════════════════════════════════════════════════════════════╝ [2026-06-06T03:41:46.355Z] [DEPLOY] [2026-06-06 03:41:46] STEP: Step 1/8: Pulling latest code from repository... [2026-06-06T03:41:48.395Z] [STDERR] From github.com:jhon4than/saas_crm [2026-06-06T03:41:48.395Z] [STDERR] * branch main -> FETCH_HEAD [2026-06-06T03:41:48.396Z] [STDERR] 6f3ed93..2b2909d main -> origin/main [2026-06-06T03:41:48.551Z] [DEPLOY] [2026-06-06 03:41:48] Deploy do commit validado pelo CI: 2b2909d7ced2c5f0c80c89123100fb18a7eb7728 [2026-06-06T03:41:48.665Z] [STDERR] Reset branch 'main' [2026-06-06T03:41:48.667Z] [DEPLOY] Your branch is up to date with 'origin/main'. [2026-06-06T03:41:48.669Z] [DEPLOY] [2026-06-06 03:41:48] ✓ Code updated to latest version [2026-06-06T03:41:48.671Z] [DEPLOY] [2026-06-06 03:41:48] STEP: Step 2/8: Backing up current state... [2026-06-06T03:41:48.672Z] [DEPLOY] [2026-06-06 03:41:48] STEP: Creating backup of current state... [2026-06-06T03:41:49.060Z] [DEPLOY] [2026-06-06 03:41:49] ✓ Backup created at /www/wwwroot/saas_crm/backups [2026-06-06T03:41:49.061Z] [DEPLOY] [2026-06-06 03:41:49] STEP: Step 3/8: Creating database backup (safety first!)... [2026-06-06T03:41:49.067Z] [DEPLOY] ╔════════════════════════════════════════╗ [2026-06-06T03:41:49.067Z] [DEPLOY] ║ ClickNex CRM - Database Backup ║ [2026-06-06T03:41:49.067Z] [DEPLOY] ╚════════════════════════════════════════╝ [2026-06-06T03:41:49.068Z] [DEPLOY] Database: saas_crm [2026-06-06T03:41:49.068Z] [DEPLOY] Host: localhost:5432 [2026-06-06T03:41:49.068Z] [DEPLOY] Backup file: /www/wwwroot/saas_crm/backups/database/backup_20260606_034149.sql.gz [2026-06-06T03:41:49.068Z] [DEPLOY] pg_dump not found locally, using Docker... [2026-06-06T03:41:49.109Z] [STDERR] Unable to find image 'postgres:18-alpine' locally [2026-06-06T03:41:50.420Z] [STDERR] 18-alpine: [2026-06-06T03:41:50.421Z] [STDERR] Pulling from library/postgres [2026-06-06T03:41:50.862Z] [STDERR] 4e227c0c29b0: Pulling fs layer [2026-06-06T03:41:50.862Z] [STDERR] 6797fe14fc37: Pulling fs layer [2026-06-06T03:41:50.862Z] [STDERR] cb0e827e8389: Pulling fs layer [2026-06-06T03:41:50.862Z] [STDERR] 3771f4eeb917: Pulling fs layer [2026-06-06T03:41:50.862Z] [STDERR] 033acd588901: Pulling fs layer [2026-06-06T03:41:50.863Z] [STDERR] cb2ae37abf29: Pulling fs layer [2026-06-06T03:41:50.864Z] [STDERR] 56e975b78d08: Pulling fs layer [2026-06-06T03:41:50.866Z] [STDERR] 05f6e8830d21: Pulling fs layer [2026-06-06T03:41:51.163Z] [STDERR] 3771f4eeb917: Download complete [2026-06-06T03:41:51.270Z] [STDERR] 6797fe14fc37: Download complete [2026-06-06T03:41:51.368Z] [STDERR] 033acd588901: Download complete [2026-06-06T03:41:51.370Z] [STDERR] cb2ae37abf29: Download complete [2026-06-06T03:41:51.370Z] [STDERR] 56e975b78d08: Download complete [2026-06-06T03:41:51.372Z] [STDERR] 05f6e8830d21: Download complete [2026-06-06T03:41:51.373Z] [STDERR] cb0e827e8389: Download complete [2026-06-06T03:41:51.515Z] [STDERR] 6797fe14fc37: Pull complete [2026-06-06T03:41:51.771Z] [STDERR] b5d163238017: Download complete [2026-06-06T03:41:51.823Z] [STDERR] cb0e827e8389: Pull complete [2026-06-06T03:41:51.855Z] [STDERR] 981ab96b77ff: Download complete [2026-06-06T03:41:51.961Z] [STDERR] 3771f4eeb917: Pull complete [2026-06-06T03:41:57.548Z] [STDERR] 4e227c0c29b0: [2026-06-06T03:41:57.549Z] [STDERR] Download complete [2026-06-06T03:42:07.758Z] [STDERR] cb2ae37abf29: [2026-06-06T03:42:07.759Z] [STDERR] Pull complete [2026-06-06T03:42:07.779Z] [STDERR] 4e227c0c29b0: [2026-06-06T03:42:07.779Z] [STDERR] Pull complete [2026-06-06T03:42:07.851Z] [STDERR] 033acd588901: [2026-06-06T03:42:07.852Z] [STDERR] Pull complete [2026-06-06T03:42:07.858Z] [STDERR] 56e975b78d08: [2026-06-06T03:42:07.859Z] [STDERR] Pull complete [2026-06-06T03:42:07.880Z] [STDERR] 033acd588901: [2026-06-06T03:42:07.880Z] [STDERR] Pull complete [2026-06-06T03:42:07.888Z] [STDERR] 56e975b78d08: Pull complete [2026-06-06T03:42:07.893Z] [STDERR] 05f6e8830d21: Pull complete [2026-06-06T03:42:07.894Z] [STDERR] Digest: sha256:96d56f7f57c6aacd1fcb908bc83b345ec5f83231ee486dd66a1baadce274db88 [2026-06-06T03:42:07.894Z] [STDERR] Status: Downloaded newer image for postgres:18-alpine [2026-06-06T03:46:14.295Z] [DEPLOY] ✓ Backup created successfully: /www/wwwroot/saas_crm/backups/database/backup_20260606_034149.sql.gz (2.6G) [2026-06-06T03:46:14.298Z] [DEPLOY] Mantendo apenas os 3 backup(s) mais recente(s)... [2026-06-06T03:46:14.300Z] [DEPLOY] removendo antigo: backup_20260602_203350.sql.gz [2026-06-06T03:46:14.316Z] [DEPLOY] Current backups: [2026-06-06T03:46:14.320Z] [DEPLOY] -rw-r--r-- 1 root root 2.5G Jun 3 14:36 /www/wwwroot/saas_crm/backups/database/backup_20260603_143203.sql.gz [2026-06-06T03:46:14.321Z] [DEPLOY] -rw-r--r-- 1 root root 2.5G Jun 3 20:59 /www/wwwroot/saas_crm/backups/database/backup_20260603_205509.sql.gz [2026-06-06T03:46:14.322Z] [DEPLOY] -rw-r--r-- 1 root root 2.6G Jun 6 03:46 /www/wwwroot/saas_crm/backups/database/backup_20260606_034149.sql.gz [2026-06-06T03:46:14.325Z] [DEPLOY] Backup completed! [2026-06-06T03:46:14.327Z] [DEPLOY] [2026-06-06 03:46:14] ✓ Database backup completed [2026-06-06T03:46:14.332Z] [DEPLOY] [2026-06-06 03:46:14] STEP: Step 4/8: Building new Docker images... [2026-06-06T03:46:14.333Z] [DEPLOY] [2026-06-06 03:46:14] STEP: Snapshot das imagens atuais (rede de segurança p/ rollback)... [2026-06-06T03:46:14.515Z] [DEPLOY] [2026-06-06 03:46:14] ✓ Backend atual salvo como clicknex-backend:prev [2026-06-06T03:46:14.569Z] [DEPLOY] [2026-06-06 03:46:14] ✓ Frontend atual salvo como clicknex-frontend:prev [2026-06-06T03:46:15.325Z] [STDERR] time="2026-06-06T03:46:15Z" level=warning msg="Docker Compose is configured to build using Bake, but buildx isn't installed" [2026-06-06T03:46:15.762Z] [DEPLOY] #0 building with "default" instance using docker driver [2026-06-06T03:46:15.762Z] [DEPLOY] #1 [backend internal] load build definition from Dockerfile [2026-06-06T03:46:15.762Z] [DEPLOY] #1 transferring dockerfile: 3.00kB 0.0s done [2026-06-06T03:46:15.763Z] [DEPLOY] #1 DONE 0.1s [2026-06-06T03:46:15.763Z] [DEPLOY] #2 [backend] resolve image config for docker-image://docker.io/docker/dockerfile:1 [2026-06-06T03:46:16.725Z] [DEPLOY] #2 DONE 1.0s [2026-06-06T03:46:16.865Z] [DEPLOY] #3 [backend] docker-image://docker.io/docker/dockerfile:1@sha256:87999aa3d42bdc6bea60565083ee17e86d1f3339802f543c0d03998580f9cb89 [2026-06-06T03:46:16.865Z] [DEPLOY] #3 resolve docker.io/docker/dockerfile:1@sha256:87999aa3d42bdc6bea60565083ee17e86d1f3339802f543c0d03998580f9cb89 0.0s done [2026-06-06T03:46:17.047Z] [DEPLOY] #3 CACHED [2026-06-06T03:46:17.245Z] [DEPLOY] #4 [backend internal] load metadata for docker.io/library/node:20-alpine [2026-06-06T03:46:17.952Z] [DEPLOY] #4 DONE 0.7s [2026-06-06T03:46:18.066Z] [DEPLOY] #5 [backend internal] load .dockerignore [2026-06-06T03:46:18.066Z] [DEPLOY] #5 transferring context: 304B done [2026-06-06T03:46:18.067Z] [DEPLOY] #5 DONE 0.0s [2026-06-06T03:46:18.067Z] [DEPLOY] #6 [backend internal] load build context [2026-06-06T03:46:18.067Z] [DEPLOY] #6 DONE 0.0s [2026-06-06T03:46:18.067Z] [DEPLOY] #7 [backend builder 1/10] FROM docker.io/library/node:20-alpine@sha256:fb4cd12c85ee03686f6af5362a0b0d56d50c58a04632e6c0fb8363f609372293 [2026-06-06T03:46:18.067Z] [DEPLOY] #7 resolve docker.io/library/node:20-alpine@sha256:fb4cd12c85ee03686f6af5362a0b0d56d50c58a04632e6c0fb8363f609372293 0.0s done [2026-06-06T03:46:18.067Z] [DEPLOY] #7 DONE 0.0s [2026-06-06T03:46:18.195Z] [DEPLOY] #6 [backend internal] load build context [2026-06-06T03:46:18.377Z] [DEPLOY] #6 transferring context: 337.87kB 0.3s done [2026-06-06T03:46:18.611Z] [DEPLOY] #6 DONE 0.3s [2026-06-06T03:46:18.611Z] [DEPLOY] #8 [backend builder 2/10] WORKDIR /app [2026-06-06T03:46:18.611Z] [DEPLOY] #8 CACHED [2026-06-06T03:46:18.611Z] [DEPLOY] #9 [backend builder 3/10] RUN apk add --no-cache openssl libc6-compat python3 make g++ [2026-06-06T03:46:18.611Z] [DEPLOY] #9 CACHED [2026-06-06T03:46:18.611Z] [DEPLOY] #10 [backend builder 4/10] RUN corepack enable && corepack prepare pnpm@10.25.0 --activate [2026-06-06T03:46:18.611Z] [DEPLOY] #10 CACHED [2026-06-06T03:46:18.611Z] [DEPLOY] #11 [backend builder 5/10] COPY package.json pnpm-lock.yaml ./ [2026-06-06T03:46:18.611Z] [DEPLOY] #11 CACHED [2026-06-06T03:46:18.611Z] [DEPLOY] #12 [backend builder 6/10] RUN --mount=type=cache,id=clicknex-pnpm,target=/pnpm-store pnpm install --frozen-lockfile --store-dir /pnpm-store [2026-06-06T03:46:18.612Z] [DEPLOY] #12 CACHED [2026-06-06T03:46:18.612Z] [DEPLOY] #13 [backend builder 7/10] COPY . . [2026-06-06T03:46:19.327Z] [DEPLOY] #13 DONE 0.9s [2026-06-06T03:46:19.481Z] [DEPLOY] #14 [backend builder 8/10] RUN pnpm prisma generate [2026-06-06T03:46:22.938Z] [DEPLOY] #14 3.608 Prisma schema loaded from prisma/schema.prisma [2026-06-06T03:46:26.877Z] [DEPLOY] #14 7.547 [2026-06-06T03:46:26.878Z] [DEPLOY] #14 7.547 ✔ Generated Prisma Client (v5.22.0) to ./node_modules/.pnpm/@prisma+client@5.22.0_prisma@5.22.0/node_modules/@prisma/client in 2.29s [2026-06-06T03:46:26.878Z] [DEPLOY] #14 7.547 [2026-06-06T03:46:26.878Z] [DEPLOY] #14 7.547 Start by importing your Prisma Client (See: https://pris.ly/d/importing-client) [2026-06-06T03:46:26.878Z] [DEPLOY] #14 7.547 [2026-06-06T03:46:26.878Z] [DEPLOY] #14 7.547 Tip: Want to react to database changes in your app as they happen? Discover how with Pulse: https://pris.ly/tip-1-pulse [2026-06-06T03:46:26.878Z] [DEPLOY] #14 7.547 [2026-06-06T03:46:27.216Z] [DEPLOY] #14 DONE 7.9s [2026-06-06T03:46:27.367Z] [DEPLOY] #15 [backend builder 9/10] RUN pnpm build 2>&1 || (echo "Build failed - checking files:" && ls -la && exit 1) [2026-06-06T03:46:28.041Z] [DEPLOY] #15 0.825 [2026-06-06T03:46:28.042Z] [DEPLOY] #15 0.825 > backend@0.0.1 build /app [2026-06-06T03:46:28.042Z] [DEPLOY] #15 0.825 > nest build [2026-06-06T03:46:28.042Z] [DEPLOY] #15 0.825 [2026-06-06T03:47:13.727Z] [DEPLOY] #15 DONE 46.5s [2026-06-06T03:47:13.889Z] [DEPLOY] #16 [backend builder 10/10] RUN ls -la dist/src/ && test -f dist/src/main.js [2026-06-06T03:47:14.114Z] [DEPLOY] #16 0.376 total 80 [2026-06-06T03:47:14.286Z] [DEPLOY] #16 0.377 drwxr-xr-x 6 root root 4096 Jun 6 03:47 . [2026-06-06T03:47:14.287Z] [DEPLOY] #16 0.377 drwxr-xr-x 4 root root 4096 Jun 6 03:47 .. [2026-06-06T03:47:14.287Z] [DEPLOY] #16 0.377 drwxr-xr-x 3 root root 4096 Jun 6 03:47 __mocks__ [2026-06-06T03:47:14.288Z] [DEPLOY] #16 0.377 -rw-r--r-- 1 root root 181 Jun 6 03:46 app.controller.d.ts [2026-06-06T03:47:14.288Z] [DEPLOY] #16 0.377 -rw-r--r-- 1 root root 1611 Jun 6 03:46 app.controller.js [2026-06-06T03:47:14.288Z] [DEPLOY] #16 0.377 -rw-r--r-- 1 root root 436 Jun 6 03:46 app.controller.js.map [2026-06-06T03:47:14.288Z] [DEPLOY] #16 0.377 -rw-r--r-- 1 root root 35 Jun 6 03:47 app.module.d.ts [2026-06-06T03:47:14.288Z] [DEPLOY] #16 0.377 -rw-r--r-- 1 root root 8972 Jun 6 03:47 app.module.js [2026-06-06T03:47:14.288Z] [DEPLOY] #16 0.377 -rw-r--r-- 1 root root 2525 Jun 6 03:47 app.module.js.map [2026-06-06T03:47:14.288Z] [DEPLOY] #16 0.377 -rw-r--r-- 1 root root 60 Jun 6 03:46 app.service.d.ts [2026-06-06T03:47:14.288Z] [DEPLOY] #16 0.377 -rw-r--r-- 1 root root 981 Jun 6 03:46 app.service.js [2026-06-06T03:47:14.288Z] [DEPLOY] #16 0.377 -rw-r--r-- 1 root root 281 Jun 6 03:46 app.service.js.map [2026-06-06T03:47:14.288Z] [DEPLOY] #16 0.377 drwxr-xr-x 4 root root 4096 Jun 6 03:46 common [2026-06-06T03:47:14.288Z] [DEPLOY] #16 0.377 -rw-r--r-- 1 root root 11 Jun 6 03:47 main.d.ts [2026-06-06T03:47:14.288Z] [DEPLOY] #16 0.377 -rw-r--r-- 1 root root 2914 Jun 6 03:47 main.js [2026-06-06T03:47:14.288Z] [DEPLOY] #16 0.377 -rw-r--r-- 1 root root 2491 Jun 6 03:47 main.js.map [2026-06-06T03:47:14.288Z] [DEPLOY] #16 0.377 drwxr-xr-x 58 root root 4096 Jun 6 03:47 modules [2026-06-06T03:47:14.289Z] [DEPLOY] #16 0.377 drwxr-xr-x 2 root root 4096 Jun 6 03:46 prisma [2026-06-06T03:47:14.289Z] [DEPLOY] #16 DONE 0.4s [2026-06-06T03:47:23.401Z] [DEPLOY] #17 [backend production 5/12] RUN addgroup -g 1001 -S nodejs && adduser -S nestjs -u 1001 [2026-06-06T03:47:23.402Z] [DEPLOY] #17 CACHED [2026-06-06T03:47:23.402Z] [DEPLOY] #18 [backend production 6/12] COPY package.json pnpm-lock.yaml ./ [2026-06-06T03:47:23.402Z] [DEPLOY] #18 CACHED [2026-06-06T03:47:23.402Z] [DEPLOY] #19 [backend production 7/12] COPY prisma ./prisma/ [2026-06-06T03:47:23.402Z] [DEPLOY] #19 CACHED [2026-06-06T03:47:23.402Z] [DEPLOY] #20 [backend production 8/12] RUN --mount=type=cache,id=clicknex-pnpm,target=/pnpm-store pnpm install --frozen-lockfile --prod --store-dir /pnpm-store [2026-06-06T03:47:23.403Z] [DEPLOY] #20 CACHED [2026-06-06T03:47:23.403Z] [DEPLOY] #21 [backend production 3/12] RUN apk add --no-cache openssl libc6-compat ffmpeg [2026-06-06T03:47:23.403Z] [DEPLOY] #21 CACHED [2026-06-06T03:47:23.403Z] [DEPLOY] #22 [backend production 4/12] RUN corepack enable && corepack prepare pnpm@10.25.0 --activate [2026-06-06T03:47:23.403Z] [DEPLOY] #22 CACHED [2026-06-06T03:47:23.403Z] [DEPLOY] #23 [backend production 9/12] RUN pnpm prisma generate [2026-06-06T03:47:23.563Z] [DEPLOY] #23 CACHED [2026-06-06T03:47:23.564Z] [DEPLOY] #24 [backend production 10/12] COPY --from=builder /app/dist ./dist [2026-06-06T03:47:23.970Z] [DEPLOY] #24 DONE 0.6s [2026-06-06T03:47:24.125Z] [DEPLOY] #25 [backend production 11/12] RUN mkdir -p /app/uploads/platform /app/uploads/templates /app/uploads/instagram [2026-06-06T03:47:24.260Z] [DEPLOY] #25 DONE 0.3s [2026-06-06T03:47:24.411Z] [DEPLOY] #26 [backend production 12/12] RUN chown -R nestjs:nodejs /app [2026-06-06T03:47:54.599Z] [DEPLOY] #26 DONE 30.3s [2026-06-06T03:47:54.773Z] [DEPLOY] #27 [backend] exporting to image [2026-06-06T03:47:54.773Z] [DEPLOY] #27 exporting layers [2026-06-06T03:48:13.579Z] [DEPLOY] #27 exporting layers 19.0s done [2026-06-06T03:48:13.793Z] [DEPLOY] #27 exporting manifest sha256:240ce571e55708f93568b331cc3e1747077e3e5b072e024acd1a0a67ef7724df done [2026-06-06T03:48:13.793Z] [DEPLOY] #27 exporting config sha256:0768c21ce6dd468545680d39ef336d6b59e44f3c14d179bf114245a2a47fce8f done [2026-06-06T03:48:13.793Z] [DEPLOY] #27 exporting attestation manifest sha256:460770eca329489185177ecc23cb890ec379f73d5ef692768f2d3e37858b41c4 0.0s done [2026-06-06T03:48:13.793Z] [DEPLOY] #27 exporting manifest list sha256:f0298e8a71a9815c5b7305adb97e277d0c80f6b32b573cd5afc728a66b2841ac 0.0s done [2026-06-06T03:48:13.793Z] [DEPLOY] #27 naming to docker.io/library/saas_crm-backend:latest done [2026-06-06T03:48:13.793Z] [DEPLOY] #27 unpacking to docker.io/library/saas_crm-backend:latest [2026-06-06T03:48:21.174Z] [DEPLOY] #27 unpacking to docker.io/library/saas_crm-backend:latest 7.5s done [2026-06-06T03:48:21.397Z] [DEPLOY] #27 DONE 26.6s [2026-06-06T03:48:21.514Z] [DEPLOY] #28 [backend] resolving provenance for metadata file [2026-06-06T03:48:21.627Z] [DEPLOY] #28 DONE 0.0s [2026-06-06T03:48:21.803Z] [DEPLOY] #29 [frontend internal] load build definition from Dockerfile [2026-06-06T03:48:21.803Z] [DEPLOY] #29 transferring dockerfile: 1.38kB done [2026-06-06T03:48:21.803Z] [DEPLOY] #29 DONE 0.0s [2026-06-06T03:48:21.803Z] [DEPLOY] #2 [frontend] resolve image config for docker-image://docker.io/docker/dockerfile:1 [2026-06-06T03:48:22.154Z] [DEPLOY] #2 DONE 1.5s [2026-06-06T03:48:22.342Z] [DEPLOY] #3 [frontend] docker-image://docker.io/docker/dockerfile:1@sha256:87999aa3d42bdc6bea60565083ee17e86d1f3339802f543c0d03998580f9cb89 [2026-06-06T03:48:22.343Z] [DEPLOY] #3 resolve docker.io/docker/dockerfile:1@sha256:87999aa3d42bdc6bea60565083ee17e86d1f3339802f543c0d03998580f9cb89 0.0s done [2026-06-06T03:48:22.343Z] [DEPLOY] #3 CACHED [2026-06-06T03:48:22.455Z] [DEPLOY] #30 [frontend internal] load metadata for docker.io/library/nginx:alpine [2026-06-06T03:48:22.940Z] [DEPLOY] #30 ... [2026-06-06T03:48:22.940Z] [DEPLOY] #4 [frontend internal] load metadata for docker.io/library/node:20-alpine [2026-06-06T03:48:22.940Z] [DEPLOY] #4 DONE 1.2s [2026-06-06T03:48:23.091Z] [DEPLOY] #30 [frontend internal] load metadata for docker.io/library/nginx:alpine [2026-06-06T03:48:23.353Z] [DEPLOY] #30 DONE 0.9s [2026-06-06T03:48:23.541Z] [DEPLOY] #31 [frontend internal] load .dockerignore [2026-06-06T03:48:23.541Z] [DEPLOY] #31 transferring context: 194B done [2026-06-06T03:48:23.541Z] [DEPLOY] #31 DONE 0.0s [2026-06-06T03:48:24.196Z] [DEPLOY] #7 [frontend builder 1/7] FROM docker.io/library/node:20-alpine@sha256:fb4cd12c85ee03686f6af5362a0b0d56d50c58a04632e6c0fb8363f609372293 [2026-06-06T03:48:24.197Z] [DEPLOY] #7 resolve docker.io/library/node:20-alpine@sha256:fb4cd12c85ee03686f6af5362a0b0d56d50c58a04632e6c0fb8363f609372293 0.1s done [2026-06-06T03:48:24.197Z] [DEPLOY] #7 DONE 0.1s [2026-06-06T03:48:24.197Z] [DEPLOY] #32 [frontend production 1/4] FROM docker.io/library/nginx:alpine@sha256:8b1e78743a03dbb2c95171cc58639fef29abc8816598e27fb910ed2e621e589a [2026-06-06T03:48:24.198Z] [DEPLOY] #32 resolve docker.io/library/nginx:alpine@sha256:8b1e78743a03dbb2c95171cc58639fef29abc8816598e27fb910ed2e621e589a 0.1s done [2026-06-06T03:48:24.198Z] [DEPLOY] #32 DONE 0.1s [2026-06-06T03:48:24.198Z] [DEPLOY] #33 [frontend internal] load build context [2026-06-06T03:48:24.199Z] [DEPLOY] #33 transferring context: 245.18kB 0.1s done [2026-06-06T03:48:24.380Z] [DEPLOY] #33 DONE 0.1s [2026-06-06T03:48:24.380Z] [DEPLOY] #34 [frontend builder 4/7] COPY package.json pnpm-lock.yaml ./ [2026-06-06T03:48:24.380Z] [DEPLOY] #34 CACHED [2026-06-06T03:48:24.380Z] [DEPLOY] #8 [frontend builder 2/7] WORKDIR /app [2026-06-06T03:48:24.380Z] [DEPLOY] #8 CACHED [2026-06-06T03:48:24.380Z] [DEPLOY] #35 [frontend builder 3/7] RUN corepack enable && corepack prepare pnpm@10.25.0 --activate [2026-06-06T03:48:24.380Z] [DEPLOY] #35 CACHED [2026-06-06T03:48:24.380Z] [DEPLOY] #36 [frontend builder 5/7] RUN --mount=type=cache,id=clicknex-pnpm-web,target=/pnpm-store pnpm install --frozen-lockfile --store-dir /pnpm-store [2026-06-06T03:48:24.380Z] [DEPLOY] #36 CACHED [2026-06-06T03:48:24.380Z] [DEPLOY] #37 [frontend builder 6/7] COPY . . [2026-06-06T03:48:24.557Z] [DEPLOY] #37 DONE 0.3s [2026-06-06T03:48:24.710Z] [DEPLOY] #38 [frontend builder 7/7] RUN pnpm build [2026-06-06T03:48:25.344Z] [DEPLOY] #38 0.784 [2026-06-06T03:48:25.344Z] [DEPLOY] #38 0.784 > frontend@1.0.0 build /app [2026-06-06T03:48:25.347Z] [DEPLOY] #38 0.784 > tsc && vite build [2026-06-06T03:48:25.347Z] [DEPLOY] #38 0.784 [2026-06-06T03:49:24.136Z] [DEPLOY] #38 59.58 vite v5.4.21 building for production... [2026-06-06T03:49:25.069Z] [DEPLOY] #38 60.51 transforming... [2026-06-06T03:49:25.304Z] [DEPLOY] #38 60.59 Browserslist: browsers data (caniuse-lite) is 6 months old. Please run: [2026-06-06T03:49:25.304Z] [DEPLOY] #38 60.59 npx update-browserslist-db@latest [2026-06-06T03:49:25.304Z] [DEPLOY] #38 60.59 Why you should do it regularly: https://github.com/browserslist/update-db#readme [2026-06-06T03:49:51.713Z] [DEPLOY] #38 87.15 ✓ 4326 modules transformed. [2026-06-06T03:49:53.886Z] [DEPLOY] #38 89.33 rendering chunks... [2026-06-06T03:49:58.430Z] [DEPLOY] #38 93.87 computing gzip size... [2026-06-06T03:49:58.560Z] [DEPLOY] #38 94.00 dist/registerSW.js 0.13 kB [2026-06-06T03:49:58.734Z] [DEPLOY] #38 94.00 dist/manifest.webmanifest 0.54 kB [2026-06-06T03:49:58.734Z] [DEPLOY] #38 94.00 dist/index.html 2.06 kB │ gzip: 0.76 kB [2026-06-06T03:49:58.734Z] [DEPLOY] #38 94.00 dist/assets/index-2PMsNwYe.css 163.19 kB │ gzip: 24.90 kB [2026-06-06T03:49:58.735Z] [DEPLOY] #38 94.00 dist/assets/purify.es-dhnUglUx.js 24.29 kB │ gzip: 9.17 kB [2026-06-06T03:49:58.735Z] [DEPLOY] #38 94.00 dist/assets/index.es-CIQ2vqt5.js 150.69 kB │ gzip: 51.55 kB [2026-06-06T03:49:58.735Z] [DEPLOY] #38 94.00 dist/assets/html2canvas.esm-CBrSDip1.js 201.42 kB │ gzip: 48.03 kB [2026-06-06T03:49:58.735Z] [DEPLOY] #38 94.00 dist/assets/index-Bin5O5Ni.js 4,153.04 kB │ gzip: 1,078.44 kB [2026-06-06T03:49:58.735Z] [DEPLOY] #38 94.00 [2026-06-06T03:49:58.735Z] [DEPLOY] #38 94.00 (!) Some chunks are larger than 500 kB after minification. Consider: [2026-06-06T03:49:58.735Z] [DEPLOY] #38 94.00 - Using dynamic import() to code-split the application [2026-06-06T03:49:58.735Z] [DEPLOY] #38 94.00 - Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks [2026-06-06T03:49:58.735Z] [DEPLOY] #38 94.00 - Adjust chunk size limit for this warning via build.chunkSizeWarningLimit. [2026-06-06T03:49:58.735Z] [DEPLOY] #38 94.00 ✓ built in 34.37s [2026-06-06T03:49:58.735Z] [DEPLOY] #38 94.02 [2026-06-06T03:49:58.735Z] [DEPLOY] #38 94.02 PWA v1.2.0 [2026-06-06T03:49:58.735Z] [DEPLOY] #38 94.02 Building src/sw.ts service worker ("es" format)... [2026-06-06T03:49:58.735Z] [DEPLOY] #38 94.02 vite v5.4.21 building for production... [2026-06-06T03:49:58.735Z] [DEPLOY] #38 94.02 transforming... [2026-06-06T03:50:01.004Z] [DEPLOY] #38 96.44 ✓ 1 modules transformed. [2026-06-06T03:50:01.153Z] [DEPLOY] #38 96.45 rendering chunks... [2026-06-06T03:50:01.153Z] [DEPLOY] #38 96.45 computing gzip size... [2026-06-06T03:50:01.153Z] [DEPLOY] #38 96.45 dist/sw.mjs 1.07 kB │ gzip: 0.58 kB [2026-06-06T03:50:01.153Z] [DEPLOY] #38 96.45 ✓ built in 2.44s [2026-06-06T03:50:01.153Z] [DEPLOY] #38 96.59 [2026-06-06T03:50:01.153Z] [DEPLOY] #38 96.59 PWA v1.2.0 [2026-06-06T03:50:01.153Z] [DEPLOY] #38 96.59 mode injectManifest [2026-06-06T03:50:01.153Z] [DEPLOY] #38 96.59 format: es [2026-06-06T03:50:01.153Z] [DEPLOY] #38 96.59 precache 15 entries (4942.33 KiB) [2026-06-06T03:50:01.153Z] [DEPLOY] #38 96.59 files generated [2026-06-06T03:50:01.153Z] [DEPLOY] #38 96.59 dist/sw.js [2026-06-06T03:50:02.567Z] [DEPLOY] #38 DONE 98.0s [2026-06-06T03:50:06.769Z] [DEPLOY] #39 [frontend production 2/4] RUN apk add --no-cache wget [2026-06-06T03:50:06.774Z] [DEPLOY] #39 CACHED [2026-06-06T03:50:06.775Z] [DEPLOY] #40 [frontend production 3/4] COPY nginx.conf /etc/nginx/conf.d/default.conf [2026-06-06T03:50:07.015Z] [DEPLOY] #40 CACHED [2026-06-06T03:50:07.016Z] [DEPLOY] #41 [frontend production 4/4] COPY --from=builder /app/dist /usr/share/nginx/html [2026-06-06T03:50:07.016Z] [DEPLOY] #41 DONE 0.1s [2026-06-06T03:50:07.016Z] [DEPLOY] #42 [frontend] exporting to image [2026-06-06T03:50:07.016Z] [DEPLOY] #42 exporting layers [2026-06-06T03:50:07.184Z] [DEPLOY] #42 exporting layers 0.3s done [2026-06-06T03:50:07.379Z] [DEPLOY] #42 exporting manifest sha256:3ca7dea31d5e3889e298402d30a773707b0dc8d4d7c5ce75412b4097ba539b62 0.0s done [2026-06-06T03:50:07.380Z] [DEPLOY] #42 exporting config sha256:59ecb07a9f5096d6c41be4af7387354578d3a640f937a4c783f21f09ac4055b4 0.0s done [2026-06-06T03:50:07.380Z] [DEPLOY] #42 exporting attestation manifest sha256:038f4363b00504dd45d1edfbd28d0a291ead585dabf57940bbef66a44edd5d73 0.0s done [2026-06-06T03:50:07.380Z] [DEPLOY] #42 exporting manifest list sha256:035a3251bb88c6dde904bad0b1e5584bf65998308be568d036e6ea2d482d2d9b done [2026-06-06T03:50:07.380Z] [DEPLOY] #42 naming to docker.io/library/saas_crm-frontend:latest done [2026-06-06T03:50:07.380Z] [DEPLOY] #42 unpacking to docker.io/library/saas_crm-frontend:latest 0.1s done [2026-06-06T03:50:07.561Z] [DEPLOY] #42 DONE 0.5s [2026-06-06T03:50:07.619Z] [DEPLOY] #43 [frontend] resolving provenance for metadata file [2026-06-06T03:50:07.636Z] [DEPLOY] #43 DONE 0.0s [2026-06-06T03:50:07.636Z] [STDERR] backend Built [2026-06-06T03:50:07.636Z] [STDERR] frontend Built [2026-06-06T03:50:07.657Z] [DEPLOY] [2026-06-06 03:50:07] ✓ New images built successfully [2026-06-06T03:50:07.664Z] [DEPLOY] [2026-06-06 03:50:07] STEP: Step 5/8: Running database migrations... [2026-06-06T03:50:07.666Z] [DEPLOY] [2026-06-06 03:50:07] Checking for pending migrations... [2026-06-06T03:50:07.668Z] [DEPLOY] [2026-06-06 03:50:07] Applying schema changes... [2026-06-06T03:50:11.202Z] [DEPLOY] Prisma schema loaded from prisma/schema.prisma [2026-06-06T03:50:11.254Z] [DEPLOY] Datasource "db": PostgreSQL database "saas_crm", schema "public" at "host.docker.internal:5432" [2026-06-06T03:50:11.972Z] [DEPLOY] The database is already in sync with the Prisma schema. [2026-06-06T03:50:12.044Z] [DEPLOY] npm notice [2026-06-06T03:50:12.044Z] [DEPLOY] npm notice New major version of npm available! 10.8.2 -> 11.16.0 [2026-06-06T03:50:12.044Z] [DEPLOY] npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.16.0 [2026-06-06T03:50:12.044Z] [DEPLOY] npm notice To update run: npm install -g npm@11.16.0 [2026-06-06T03:50:12.044Z] [DEPLOY] npm notice [2026-06-06T03:50:12.390Z] [DEPLOY] [2026-06-06 03:50:12] ✓ Database schema already in sync [2026-06-06T03:50:12.394Z] [DEPLOY] [2026-06-06 03:50:12] STEP: Step 6/8: Starting new containers (Blue-Green deployment)... [2026-06-06T03:50:12.395Z] [DEPLOY] [2026-06-06 03:50:12] Updating backend container... [2026-06-06T03:50:12.708Z] [STDERR] Container clicknex-redis Running [2026-06-06T03:50:12.709Z] [STDERR] Container clicknex-backend Recreate [2026-06-06T03:50:23.376Z] [STDERR] Container clicknex-backend Recreated [2026-06-06T03:50:23.411Z] [STDERR] Container clicknex-redis Waiting [2026-06-06T03:50:23.914Z] [STDERR] Container clicknex-redis Healthy [2026-06-06T03:50:23.914Z] [STDERR] Container clicknex-backend Starting [2026-06-06T03:50:24.198Z] [STDERR] Container clicknex-backend Started [2026-06-06T03:50:29.283Z] [DEPLOY] Waiting for Backend... (1/30) [status: starting] [2026-06-06T03:50:31.341Z] [DEPLOY] [2026-06-06 03:50:31] ✓ Backend health check passed (healthy) [2026-06-06T03:50:31.343Z] [DEPLOY] [2026-06-06 03:50:31] Updating frontend container... [2026-06-06T03:50:31.547Z] [STDERR] Container clicknex-frontend Recreate [2026-06-06T03:50:32.138Z] [STDERR] Container clicknex-frontend Recreated [2026-06-06T03:50:32.171Z] [STDERR] Container clicknex-frontend Starting [2026-06-06T03:50:32.423Z] [STDERR] Container clicknex-frontend Started [2026-06-06T03:50:32.434Z] [DEPLOY] [2026-06-06 03:50:32] ✓ New containers started [2026-06-06T03:50:32.435Z] [DEPLOY] [2026-06-06 03:50:32] STEP: Step 7/8: Running health checks... [2026-06-06T03:50:32.487Z] [DEPLOY] [2026-06-06 03:50:32] ✓ Backend health check passed (healthy) [2026-06-06T03:50:32.557Z] [DEPLOY] Waiting for Frontend... (1/30) [status: starting] [2026-06-06T03:50:34.621Z] [DEPLOY] Waiting for Frontend... (2/30) [status: starting] [2026-06-06T03:50:36.681Z] [DEPLOY] Waiting for Frontend... (3/30) [status: starting] [2026-06-06T03:50:38.747Z] [DEPLOY] [2026-06-06 03:50:38] ✓ Frontend health check passed (healthy) [2026-06-06T03:50:38.749Z] [DEPLOY] [2026-06-06 03:50:38] ✓ All health checks passed [2026-06-06T03:50:38.751Z] [DEPLOY] [2026-06-06 03:50:38] STEP: Step 8/8: Cleaning up old resources... [2026-06-06T03:50:38.888Z] [DEPLOY] [2026-06-06 03:50:38] ✓ Cleanup completed (disco: ?%) [2026-06-06T03:50:38.889Z] [DEPLOY] ╔════════════════════════════════════════════════════════════╗ [2026-06-06T03:50:38.889Z] [DEPLOY] ║ Deployment Completed Successfully! ✓ ║ [2026-06-06T03:50:38.889Z] [DEPLOY] ╠════════════════════════════════════════════════════════════╣ [2026-06-06T03:50:38.895Z] [DEPLOY] ║ Commit: 2b2909d ║ [2026-06-06T03:50:38.897Z] [DEPLOY] ║ Time: 2026-06-06 03:50:38 ║ [2026-06-06T03:50:38.897Z] [DEPLOY] ╠════════════════════════════════════════════════════════════╣ [2026-06-06T03:50:38.898Z] [DEPLOY] ║ Services: ║ [2026-06-06T03:50:38.898Z] [DEPLOY] ║ - Backend: http://localhost:3021 ║ [2026-06-06T03:50:38.898Z] [DEPLOY] ║ - Frontend: http://localhost:3020 ║ [2026-06-06T03:50:38.898Z] [DEPLOY] ╚════════════════════════════════════════════════════════════╝ [2026-06-06T03:50:38.901Z] [INFO] Deploy script encerrado com código: 0 [2026-06-06T03:50:38.902Z] [INFO] ====================================================== [2026-06-06T03:50:38.902Z] [INFO] DEPLOY SUCESSO ✓ — v1.0.7 em 533s [2026-06-06T03:50:38.903Z] [INFO] ======================================================