From 2f0e4ee1e5a816d85455a1c7ff1dbf25153b227e Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 12 Jan 2025 20:56:23 -0500 Subject: [PATCH] docker --- docker-compose.yaml | 48 ++++++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index b286919c..405d8f1b 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,57 +1,61 @@ services: - api: - container_name: evolution_api - image: atendai/evolution-api:homolog + evolution-api: + container_name: evolution-api + build: + context: . + dockerfile: Dockerfile restart: always depends_on: - - redis + - evolution-redis - postgres ports: - 8080:8080 volumes: - - evolution_instances:/evolution/instances + - evolution-instances:/evolution/instances networks: - - evolution-net + - chatwoot-evolution-network env_file: - .env expose: - 8080 - redis: + evolution-redis: image: redis:latest + container_name: evolution-redis + restart: always networks: - - evolution-net - container_name: redis + - chatwoot-evolution-network command: > redis-server --port 6379 --appendonly yes volumes: - - evolution_redis:/data + - evolution-redis:/data ports: - 6379:6379 - postgres: - container_name: postgres + evolution-postgres: + container_name: evolution-postgres image: postgres:15 networks: - - evolution-net - command: ["postgres", "-c", "max_connections=1000"] + - chatwoot-evolution-network + command: [ "postgres", "-c", "max_connections=1000" ] restart: always ports: - 5432:5432 environment: - - POSTGRES_PASSWORD=PASSWORD + - POSTGRES_USER=${POSTGRES_USER} + - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} + - POSTGRES_DB=${POSTGRES_DB} volumes: - - postgres_data:/var/lib/postgresql/data + - evolution-postgres:/var/lib/postgresql/data expose: - 5432 volumes: - evolution_instances: - evolution_redis: - postgres_data: + evolution-instances: + evolution-redis: + evolution-postgres: networks: - evolution-net: - name: evolution-net - driver: bridge + chatwoot-evolution-network: + external: true