Skip to content

Commit 7425512

Browse files
committed
Merge branch 'release/2.1.2'
2 parents f3b04d8 + 7a47278 commit 7425512

File tree

18 files changed

+94
-1791
lines changed

18 files changed

+94
-1791
lines changed

.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ SERVER_URL=http://localhost:8080
55

66
SENTRY_DSN=
77

8+
TZ=America/Sao_Paulo
9+
810
# Cors - * for all or set separate by commas - ex.: 'yourdomain1.com, yourdomain2.com'
911
CORS_ORIGIN=*
1012
CORS_METHODS=GET,POST,PUT,DELETE

Docker/minio/docker-compose.yaml

Lines changed: 0 additions & 31 deletions
This file was deleted.

Docker/swarm/evolution_api_v2.yaml

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
version: "3.7"
22

33
services:
4-
evolution_v2:
5-
image: atendai/evolution-api-lite:v2.1.2
4+
evolution_v2_lite:
5+
image: atendai/evolution-api-lite:latest
66
volumes:
77
- evolution_instances:/evolution/instances
88
networks:
@@ -19,10 +19,10 @@ services:
1919
- DATABASE_SAVE_DATA_CHATS=true
2020
- DATABASE_SAVE_DATA_LABELS=true
2121
- DATABASE_SAVE_DATA_HISTORIC=true
22-
- DATABASE_CONNECTION_CLIENT_NAME=evolution_v2
22+
- DATABASE_CONNECTION_CLIENT_NAME=evolution_v2_lite
2323
- RABBITMQ_ENABLED=false
2424
- RABBITMQ_URI=amqp://admin:admin@rabbitmq:5672/default
25-
- RABBITMQ_EXCHANGE_NAME=evolution_v2
25+
- RABBITMQ_EXCHANGE_NAME=evolution_v2_lite
2626
- RABBITMQ_GLOBAL_ENABLED=false
2727
- RABBITMQ_EVENTS_APPLICATION_STARTUP=false
2828
- RABBITMQ_EVENTS_INSTANCE_CREATE=false
@@ -96,16 +96,9 @@ services:
9696
- QRCODE_LIMIT=30
9797
- CACHE_REDIS_ENABLED=true
9898
- CACHE_REDIS_URI=redis://evo_redis:6379/1
99-
- CACHE_REDIS_PREFIX_KEY=evolution_v2
99+
- CACHE_REDIS_PREFIX_KEY=evolution_v2_lite
100100
- CACHE_REDIS_SAVE_INSTANCES=false
101101
- CACHE_LOCAL_ENABLED=false
102-
- S3_ENABLED=true
103-
- S3_ACCESS_KEY=
104-
- S3_SECRET_KEY=
105-
- S3_BUCKET=evolution
106-
- S3_PORT=443
107-
- S3_ENDPOINT=files.site.com
108-
- S3_USE_SSL=true
109102
- AUTHENTICATION_API_KEY=429683C4C977415CAAFCCE10F7D57E11
110103
- AUTHENTICATION_EXPOSE_IN_FETCH_INSTANCES=true
111104
- LANGUAGE=en
@@ -117,18 +110,18 @@ services:
117110
- node.hostname == evolution-manager
118111
labels:
119112
- traefik.enable=true
120-
- traefik.http.routers.evolution_v2.rule=Host(`evo2.site.com`)
121-
- traefik.http.routers.evolution_v2.entrypoints=websecure
122-
- traefik.http.routers.evolution_v2.tls.certresolver=letsencryptresolver
123-
- traefik.http.routers.evolution_v2.priority=1
124-
- traefik.http.routers.evolution_v2.service=evolution_v2
125-
- traefik.http.services.evolution_v2.loadbalancer.server.port=8080
126-
- traefik.http.services.evolution_v2.loadbalancer.passHostHeader=true
113+
- traefik.http.routers.evolution_v2_lite.rule=Host(`evo2.site.com`)
114+
- traefik.http.routers.evolution_v2_lite.entrypoints=websecure
115+
- traefik.http.routers.evolution_v2_lite.tls.certresolver=letsencryptresolver
116+
- traefik.http.routers.evolution_v2_lite.priority=1
117+
- traefik.http.routers.evolution_v2_lite.service=evolution_v2_lite
118+
- traefik.http.services.evolution_v2_lite.loadbalancer.server.port=8080
119+
- traefik.http.services.evolution_v2_lite.loadbalancer.passHostHeader=true
127120

128121
volumes:
129122
evolution_instances:
130123
external: true
131-
name: evolution_v2_data
124+
name: evolution_v2_lite_data
132125

133126
networks:
134127
network_public:

Dockerfile

Lines changed: 9 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,36 @@
11
FROM node:20-alpine AS builder
22

3-
RUN apk update && \
4-
apk add git wget curl bash
5-
6-
LABEL version="2.1.2-lite" description="Api to control whatsapp features through http requests."
7-
LABEL maintainer="Davidson Gomes" git="https://github.com/EvolutionAPI"
8-
LABEL contact="davidson@evolution-api.com"
3+
RUN apk add git wget curl bash
94

105
WORKDIR /evolution
116

127
COPY ./package.json ./tsconfig.json ./
13-
148
RUN npm install --omit=dev
159

10+
RUN rm -rf /var/cache/apk/*
11+
1612
COPY ./src ./src
1713
COPY ./public ./public
1814
COPY ./prisma ./prisma
19-
COPY ./manager ./manager
2015
COPY ./.env.example ./.env
2116
COPY ./runWithProvider.js ./
2217
COPY ./tsup.config.ts ./
23-
2418
COPY ./Docker ./Docker
2519

26-
RUN chmod +x ./Docker/scripts/* && dos2unix ./Docker/scripts/*
27-
28-
RUN ./Docker/scripts/generate_database.sh
29-
30-
RUN npm run build
20+
RUN chmod +x ./Docker/scripts/* && dos2unix ./Docker/scripts/* && \
21+
./Docker/scripts/generate_database.sh && \
22+
npm run build
3123

3224
FROM node:20-alpine AS final
3325

34-
RUN apk update && \
35-
apk add tzdata bash
36-
37-
ENV TZ=America/Sao_Paulo
26+
RUN apk add git wget curl bash
3827

3928
WORKDIR /evolution
4029

41-
COPY --from=builder /evolution/package.json ./package.json
42-
COPY --from=builder /evolution/package-lock.json ./package-lock.json
43-
44-
COPY --from=builder /evolution/node_modules ./node_modules
45-
COPY --from=builder /evolution/dist ./dist
46-
COPY --from=builder /evolution/prisma ./prisma
47-
COPY --from=builder /evolution/manager ./manager
48-
COPY --from=builder /evolution/public ./public
49-
COPY --from=builder /evolution/.env ./.env
50-
COPY --from=builder /evolution/Docker ./Docker
51-
COPY --from=builder /evolution/runWithProvider.js ./runWithProvider.js
52-
COPY --from=builder /evolution/tsup.config.ts ./tsup.config.ts
30+
COPY --from=builder /evolution ./
5331

5432
ENV DOCKER_ENV=true
5533

5634
EXPOSE 8080
5735

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

0 commit comments

Comments
 (0)