mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-16 04:02:54 -06:00
ajuste docker
This commit is contained in:
parent
427c994993
commit
94d9342aa5
15
Dockerfile
15
Dockerfile
@ -1,4 +1,4 @@
|
|||||||
FROM node:20-alpine AS builder
|
FROM node:20-alpine AS base
|
||||||
|
|
||||||
RUN apk update && \
|
RUN apk update && \
|
||||||
apk add git ffmpeg wget curl bash openssl
|
apk add git ffmpeg wget curl bash openssl
|
||||||
@ -9,6 +9,8 @@ LABEL contact="contato@atendai.com"
|
|||||||
|
|
||||||
WORKDIR /evolution
|
WORKDIR /evolution
|
||||||
|
|
||||||
|
FROM base AS builder
|
||||||
|
|
||||||
COPY ./package.json ./tsconfig.json ./
|
COPY ./package.json ./tsconfig.json ./
|
||||||
|
|
||||||
RUN npm install
|
RUN npm install
|
||||||
@ -29,6 +31,17 @@ RUN ./Docker/scripts/generate_database.sh
|
|||||||
|
|
||||||
RUN npm run build
|
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
|
FROM node:20-alpine AS final
|
||||||
|
|
||||||
RUN apk update && \
|
RUN apk update && \
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
services:
|
services:
|
||||||
api:
|
api:
|
||||||
container_name: evolution_api
|
build:
|
||||||
image: evolution/api:local
|
target: dev
|
||||||
build: .
|
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- 8080:8080
|
- 8080:8080
|
||||||
volumes:
|
volumes:
|
||||||
- evolution_instances:/evolution/instances
|
- evolution_instances:/evolution/instances
|
||||||
|
- ./:/evolution
|
||||||
networks:
|
networks:
|
||||||
- evolution-net
|
- evolution-net
|
||||||
env_file:
|
env_file:
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
services:
|
services:
|
||||||
api:
|
api:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
target: final
|
||||||
container_name: evolution_api
|
container_name: evolution_api
|
||||||
image: atendai/evolution-api:homolog
|
|
||||||
restart: always
|
restart: always
|
||||||
depends_on:
|
depends_on:
|
||||||
- redis
|
- redis
|
||||||
@ -34,13 +37,13 @@ services:
|
|||||||
image: postgres:15
|
image: postgres:15
|
||||||
networks:
|
networks:
|
||||||
- evolution-net
|
- evolution-net
|
||||||
command: ["postgres", "-c", "max_connections=1000", "-c", "listen_addresses=*"]
|
#command: ["postgres", "-c", "max_connections=1000", "-c", "listen_addresses=*"]
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- 5432:5432
|
- 5432:5432
|
||||||
environment:
|
environment:
|
||||||
- POSTGRES_USER=user
|
- POSTGRES_USER=evolution
|
||||||
- POSTGRES_PASSWORD=pass
|
- POSTGRES_PASSWORD=postgres
|
||||||
- POSTGRES_DB=evolution
|
- POSTGRES_DB=evolution
|
||||||
- POSTGRES_HOST_AUTH_METHOD=trust
|
- POSTGRES_HOST_AUTH_METHOD=trust
|
||||||
volumes:
|
volumes:
|
||||||
|
Loading…
Reference in New Issue
Block a user