Skip to content

Commit 94d9342

Browse files
committed
ajuste docker
1 parent 427c994 commit 94d9342

File tree

3 files changed

+24
-8
lines changed

3 files changed

+24
-8
lines changed

Dockerfile

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:20-alpine AS builder
1+
FROM node:20-alpine AS base
22

33
RUN apk update && \
44
apk add git ffmpeg wget curl bash openssl
@@ -9,6 +9,8 @@ LABEL contact="[email protected]"
99

1010
WORKDIR /evolution
1111

12+
FROM base AS builder
13+
1214
COPY ./package.json ./tsconfig.json ./
1315

1416
RUN npm install
@@ -29,6 +31,17 @@ RUN ./Docker/scripts/generate_database.sh
2931

3032
RUN npm run build
3133

34+
FROM base AS dev
35+
36+
RUN apk update && \
37+
apk add git ffmpeg wget curl bash openssl
38+
39+
COPY . .
40+
41+
RUN npm install
42+
43+
ENTRYPOINT ["/bin/bash", "-c", "npm run dev:server" ]
44+
3245
FROM node:20-alpine AS final
3346

3447
RUN apk update && \

docker-compose.dev.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
services:
22
api:
3-
container_name: evolution_api
4-
image: evolution/api:local
5-
build: .
3+
build:
4+
target: dev
65
restart: always
76
ports:
87
- 8080:8080
98
volumes:
109
- evolution_instances:/evolution/instances
10+
- ./:/evolution
1111
networks:
1212
- evolution-net
1313
env_file:

docker-compose.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
services:
22
api:
3+
build:
4+
context: .
5+
dockerfile: Dockerfile
6+
target: final
37
container_name: evolution_api
4-
image: atendai/evolution-api:homolog
58
restart: always
69
depends_on:
710
- redis
@@ -34,13 +37,13 @@ services:
3437
image: postgres:15
3538
networks:
3639
- evolution-net
37-
command: ["postgres", "-c", "max_connections=1000", "-c", "listen_addresses=*"]
40+
#command: ["postgres", "-c", "max_connections=1000", "-c", "listen_addresses=*"]
3841
restart: always
3942
ports:
4043
- 5432:5432
4144
environment:
42-
- POSTGRES_USER=user
43-
- POSTGRES_PASSWORD=pass
45+
- POSTGRES_USER=evolution
46+
- POSTGRES_PASSWORD=postgres
4447
- POSTGRES_DB=evolution
4548
- POSTGRES_HOST_AUTH_METHOD=trust
4649
volumes:

0 commit comments

Comments
 (0)