Skip to content

Commit 12b6b34

Browse files
Update Dockerfile
1 parent cd800f2 commit 12b6b34

File tree

1 file changed

+4
-55
lines changed

1 file changed

+4
-55
lines changed

Dockerfile

Lines changed: 4 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,9 @@
1-
FROM node:24-alpine AS builder
2-
3-
RUN apk update && \
4-
apk add --no-cache git ffmpeg wget curl bash openssl
5-
6-
LABEL version="2.3.1" description="Api to control whatsapp features through http requests."
7-
LABEL maintainer="Davidson Gomes" git="https://github.com/DavidsonGomes"
8-
LABEL contact="contato@evolution-api.com"
9-
10-
WORKDIR /evolution
11-
12-
COPY ./package*.json ./
13-
COPY ./tsconfig.json ./
14-
COPY ./tsup.config.ts ./
15-
16-
RUN npm ci --silent
17-
18-
COPY ./src ./src
19-
COPY ./public ./public
20-
COPY ./prisma ./prisma
21-
COPY ./manager ./manager
22-
COPY ./.env.example ./.env
23-
COPY ./runWithProvider.js ./
24-
25-
COPY ./Docker ./Docker
26-
27-
RUN chmod +x ./Docker/scripts/* && dos2unix ./Docker/scripts/*
28-
29-
RUN ./Docker/scripts/generate_database.sh
30-
31-
RUN npm run build
32-
33-
FROM node:24-alpine AS final
34-
35-
RUN apk update && \
36-
apk add tzdata ffmpeg bash openssl
37-
38-
ENV TZ=America/Sao_Paulo
39-
ENV DOCKER_ENV=true
40-
41-
WORKDIR /evolution
42-
43-
COPY --from=builder /evolution/package.json ./package.json
44-
COPY --from=builder /evolution/package-lock.json ./package-lock.json
45-
46-
COPY --from=builder /evolution/node_modules ./node_modules
47-
COPY --from=builder /evolution/dist ./dist
48-
COPY --from=builder /evolution/prisma ./prisma
49-
COPY --from=builder /evolution/manager ./manager
50-
COPY --from=builder /evolution/public ./public
51-
COPY --from=builder /evolution/.env ./.env
52-
COPY --from=builder /evolution/Docker ./Docker
53-
COPY --from=builder /evolution/runWithProvider.js ./runWithProvider.js
54-
COPY --from=builder /evolution/tsup.config.ts ./tsup.config.ts
1+
FROM atendai/evolution-api:latest
552

3+
ENV NODE_ENV=production
564
ENV DOCKER_ENV=true
5+
ENV PORT=8080
576

587
EXPOSE 8080
598

60-
ENTRYPOINT ["/bin/bash", "-c", ". ./Docker/scripts/deploy_database.sh && npm run start:prod" ]
9+
CMD ["npm", "run", "start:prod"]

0 commit comments

Comments
 (0)