mirror of
https://github.com/marcogll/coolify-n8n-evo.git
synced 2026-01-13 13:25:17 +00:00
67 lines
1.6 KiB
YAML
67 lines
1.6 KiB
YAML
# Archivo: docker-compose.yaml
|
|
# Version: 3.8 - PRODUCTION STABLE (n8n v2 pinned)
|
|
# Descripción: n8n v2 con PostgreSQL healthcheck robusto y servicios desacoplados.
|
|
|
|
version: '3.8'
|
|
|
|
services:
|
|
n8n_app:
|
|
# 🔒 FIJAMOS MAYOR VERSION (evita bugs de latest en Coolify)
|
|
image: docker.n8n.io/n8nio/n8n:2.0.3
|
|
container_name: n8n_service
|
|
restart: always
|
|
volumes:
|
|
- n8n_data:/home/node/.n8n
|
|
depends_on:
|
|
pg_database:
|
|
condition: service_healthy
|
|
# (Opcional pero recomendado en prod, si no lo tienes ya en Coolify)
|
|
# environment:
|
|
# - N8N_RUNNERS_ENABLED=true
|
|
|
|
evolution_api:
|
|
image: atendai/evolution-api:latest
|
|
container_name: evolution_api_service
|
|
restart: always
|
|
volumes:
|
|
- evolution_instances:/evolution/instances
|
|
depends_on:
|
|
redis_cache:
|
|
condition: service_started
|
|
pg_database:
|
|
condition: service_healthy
|
|
|
|
pg_database:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.postgres
|
|
container_name: shared_postgres_db
|
|
restart: always
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
# Healthcheck simple, rápido y confiable
|
|
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER}"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 30s
|
|
|
|
redis_cache:
|
|
image: redis:7-alpine
|
|
container_name: shared_redis_cache
|
|
restart: always
|
|
command: "redis-server --save 60 1 --loglevel warning"
|
|
volumes:
|
|
- evolution_redis:/data
|
|
|
|
volumes:
|
|
n8n_data:
|
|
driver: local
|
|
evolution_instances:
|
|
driver: local
|
|
postgres_data:
|
|
driver: local
|
|
evolution_redis:
|
|
driver: local
|