Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +20 -16
Dockerfile
CHANGED
|
@@ -1,31 +1,33 @@
|
|
| 1 |
FROM node:20-alpine AS builder
|
| 2 |
|
| 3 |
-
# Instalar dependencias
|
| 4 |
RUN apk add --no-cache git python3 make g++
|
| 5 |
|
| 6 |
-
# Clonar repo oficial
|
| 7 |
WORKDIR /evolution
|
| 8 |
-
RUN git clone https://github.com/EvolutionAPI/evolution-api.git .
|
| 9 |
-
RUN git checkout v2.3.4
|
| 10 |
|
| 11 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
RUN npm install
|
| 13 |
|
| 14 |
-
# ---
|
| 15 |
-
RUN echo ' \
|
| 16 |
-
"use strict"; \
|
| 17 |
-
Object.defineProperty(exports, "__esModule", { value: true }); \
|
| 18 |
-
exports.fetchLatestBaileysVersion = void 0; \
|
| 19 |
-
const fetchLatestBaileysVersion = async (options) => { \
|
| 20 |
-
|
| 21 |
-
}; \
|
| 22 |
-
|
|
|
|
| 23 |
' > ./node_modules/@whiskeysockets/baileys/lib/Utils/fetch-latest-baileys-version.js
|
| 24 |
|
| 25 |
-
# Compilar
|
| 26 |
RUN npm run build
|
| 27 |
|
| 28 |
-
# --- Imagen
|
| 29 |
FROM node:20-alpine
|
| 30 |
|
| 31 |
USER root
|
|
@@ -35,6 +37,8 @@ WORKDIR /evolution
|
|
| 35 |
COPY --from=builder /evolution/dist ./dist
|
| 36 |
COPY --from=builder /evolution/node_modules ./node_modules
|
| 37 |
COPY --from=builder /evolution/package.json .
|
|
|
|
|
|
|
| 38 |
|
| 39 |
ENV PUPPETEER_SKIP_DOWNLOAD=true
|
| 40 |
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
|
|
|
|
| 1 |
FROM node:20-alpine AS builder
|
| 2 |
|
|
|
|
| 3 |
RUN apk add --no-cache git python3 make g++
|
| 4 |
|
|
|
|
| 5 |
WORKDIR /evolution
|
|
|
|
|
|
|
| 6 |
|
| 7 |
+
# --- AQUÍ LA MAGIA: CLONAMOS TU FORK ---
|
| 8 |
+
# Cambia "TU_USUARIO" por tu usuario de GitHub real
|
| 9 |
+
RUN git clone https://github.com/Luillycarp/evolution-api.git .
|
| 10 |
+
|
| 11 |
+
# Usamos la rama principal (main) que seguro existe
|
| 12 |
+
RUN git checkout main
|
| 13 |
+
|
| 14 |
RUN npm install
|
| 15 |
|
| 16 |
+
# --- PARCHE DE FUERZA BRUTA (Sigue siendo necesario) ---
|
| 17 |
+
RUN echo ' \\
|
| 18 |
+
"use strict"; \\
|
| 19 |
+
Object.defineProperty(exports, "__esModule", { value: true }); \\
|
| 20 |
+
exports.fetchLatestBaileysVersion = void 0; \\
|
| 21 |
+
const fetchLatestBaileysVersion = async (options) => { \\
|
| 22 |
+
console.log("FORZANDO VERSION: 2.3000.1032975692"); \\
|
| 23 |
+
return { version: [2, 3000, 1032975692], isLatest: true }; \\
|
| 24 |
+
}; \\
|
| 25 |
+
exports.fetchLatestBaileysVersion = fetchLatestBaileysVersion; \\
|
| 26 |
' > ./node_modules/@whiskeysockets/baileys/lib/Utils/fetch-latest-baileys-version.js
|
| 27 |
|
|
|
|
| 28 |
RUN npm run build
|
| 29 |
|
| 30 |
+
# --- Imagen Final ---
|
| 31 |
FROM node:20-alpine
|
| 32 |
|
| 33 |
USER root
|
|
|
|
| 37 |
COPY --from=builder /evolution/dist ./dist
|
| 38 |
COPY --from=builder /evolution/node_modules ./node_modules
|
| 39 |
COPY --from=builder /evolution/package.json .
|
| 40 |
+
# Copiamos public/assets por si acaso
|
| 41 |
+
COPY --from=builder /evolution/public ./public || true
|
| 42 |
|
| 43 |
ENV PUPPETEER_SKIP_DOWNLOAD=true
|
| 44 |
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
|