ajuste docker

This commit is contained in:
Thiago Borges 2025-07-04 14:10:22 -03:00
parent 427c994993
commit 94d9342aa5
3 changed files with 24 additions and 8 deletions

View File

@ -1,4 +1,4 @@
FROM node:20-alpine AS builder
FROM node:20-alpine AS base
RUN apk update && \
apk add git ffmpeg wget curl bash openssl
@ -9,6 +9,8 @@ LABEL contact="contato@atendai.com"
WORKDIR /evolution
FROM base AS builder
COPY ./package.json ./tsconfig.json ./
RUN npm install
@ -29,6 +31,17 @@ RUN ./Docker/scripts/generate_database.sh
RUN npm run build
FROM base AS dev
RUN apk update && \
apk add git ffmpeg wget curl bash openssl
COPY . .
RUN npm install
ENTRYPOINT ["/bin/bash", "-c", "npm run dev:server" ]
FROM node:20-alpine AS final
RUN apk update && \

View File

@ -1,13 +1,13 @@
services:
api:
container_name: evolution_api
image: evolution/api:local
build: .
build:
target: dev
restart: always
ports:
- 8080:8080
volumes:
- evolution_instances:/evolution/instances
- ./:/evolution
networks:
- evolution-net
env_file:

View File

@ -1,7 +1,10 @@
services:
api:
build:
context: .
dockerfile: Dockerfile
target: final
container_name: evolution_api
image: atendai/evolution-api:homolog
restart: always
depends_on:
- redis
@ -34,13 +37,13 @@ services:
image: postgres:15
networks:
- evolution-net
command: ["postgres", "-c", "max_connections=1000", "-c", "listen_addresses=*"]
#command: ["postgres", "-c", "max_connections=1000", "-c", "listen_addresses=*"]
restart: always
ports:
- 5432:5432
environment:
- POSTGRES_USER=user
- POSTGRES_PASSWORD=pass
- POSTGRES_USER=evolution
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=evolution
- POSTGRES_HOST_AUTH_METHOD=trust
volumes: