LuillY3 commited on
Commit
0d40d23
·
verified ·
1 Parent(s): ad7270c

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -4
Dockerfile CHANGED
@@ -8,9 +8,12 @@ RUN git checkout main
8
 
9
  RUN npm install
10
 
11
- # --- PARCHE INTELIGENTE CON BÚSQUEDA AUTOMÁTICA ---
12
- # Busca el archivo y si lo encuentra, lo reemplaza. Si no existe, no hace nada (|| true)
13
- RUN find ./node_modules -name "fetch-latest-baileys-version.js" -type f -exec sh -c 'echo "\"use strict\"; Object.defineProperty(exports, \"__esModule\", { value: true }); exports.fetchLatestBaileysVersion = void 0; const fetchLatestBaileysVersion = async (options) => { console.log(\"FORZANDO VERSION: 2.3000.1032975692\"); return { version: [2, 3000, 1032975692], isLatest: true }; }; exports.fetchLatestBaileysVersion = fetchLatestBaileysVersion;" > {}' \; 2>/dev/null || echo "Archivo de versión de Baileys no encontrado, continuando..."
 
 
 
14
 
15
  RUN npm run build
16
 
@@ -25,13 +28,15 @@ COPY --from=builder /evolution/dist ./dist
25
  COPY --from=builder /evolution/node_modules ./node_modules
26
  COPY --from=builder /evolution/package.json .
27
  COPY --from=builder /evolution/public ./public 2>/dev/null || true
 
 
28
 
29
  ENV PUPPETEER_SKIP_DOWNLOAD=true
30
  ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
31
  ENV CHROME_BIN=/usr/bin/chromium-browser
32
  ENV CHROME_ARGS="--no-sandbox --disable-setuid-sandbox --disable-dev-shm-usage --disable-gpu --single-process --no-zygote"
33
 
34
- # Habilitar módulos de IA
35
  ENV EVOAI_ENABLED=true
36
  ENV OPENAI_ENABLED=true
37
  ENV DIFY_ENABLED=true
 
8
 
9
  RUN npm install
10
 
11
+ # --- FIX CRÍTICO: GENERAR CLIENTE PRISMA ---
12
+ # Esto crea los tipos de datos que faltaban en el error anterior
13
+ RUN npx prisma generate
14
+
15
+ # --- PARCHE BAILEYS INTELIGENTE ---
16
+ RUN find ./node_modules -name "fetch-latest-baileys-version.js" -type f -exec sh -c 'echo "\"use strict\"; Object.defineProperty(exports, \"__esModule\", { value: true }); exports.fetchLatestBaileysVersion = void 0; const fetchLatestBaileysVersion = async (options) => { console.log(\"FORZANDO VERSION: 2.3000.1032975692\"); return { version: [2, 3000, 1032975692], isLatest: true }; }; exports.fetchLatestBaileysVersion = fetchLatestBaileysVersion;" > {}' \; 2>/dev/null || echo "Archivo Baileys no encontrado, continuando..."
17
 
18
  RUN npm run build
19
 
 
28
  COPY --from=builder /evolution/node_modules ./node_modules
29
  COPY --from=builder /evolution/package.json .
30
  COPY --from=builder /evolution/public ./public 2>/dev/null || true
31
+ # Copiamos también la carpeta prisma por si acaso la necesita en runtime
32
+ COPY --from=builder /evolution/prisma ./prisma
33
 
34
  ENV PUPPETEER_SKIP_DOWNLOAD=true
35
  ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
36
  ENV CHROME_BIN=/usr/bin/chromium-browser
37
  ENV CHROME_ARGS="--no-sandbox --disable-setuid-sandbox --disable-dev-shm-usage --disable-gpu --single-process --no-zygote"
38
 
39
+ # Habilitar IA
40
  ENV EVOAI_ENABLED=true
41
  ENV OPENAI_ENABLED=true
42
  ENV DIFY_ENABLED=true