mirror of
https://github.com/marcogll/coolify-n8n-evo.git
synced 2026-01-13 13:25:17 +00:00
72 lines
1.9 KiB
YAML
72 lines
1.9 KiB
YAML
# Archivo: docker-compose.yml
|
|
# Version: 1.3-renamed-services
|
|
# Descripción: Stack limpio para Coolify con nombres de servicio personalizados para mayor claridad.
|
|
|
|
version: '3.8'
|
|
|
|
services:
|
|
#--- N8N SERVICE ---#
|
|
n8n_app: ## CAMBIO ##
|
|
image: docker.n8n.io/n8nio/n8n:latest
|
|
container_name: n8n_service
|
|
restart: always
|
|
volumes:
|
|
- n8n_data:/home/node/.n8n
|
|
depends_on:
|
|
pg_database: ## CAMBIO ##
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:5678/healthz || exit 1"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 5
|
|
|
|
#--- EVOLUTION API SERVICE ---#
|
|
evolution_api: ## CAMBIO ##
|
|
image: atendai/evolution-api:latest
|
|
container_name: evolution_api_service
|
|
restart: always
|
|
volumes:
|
|
- evolution_instances:/evolution/instances
|
|
depends_on:
|
|
- redis_cache ## CAMBIO ##
|
|
- pg_database ## CAMBIO ##
|
|
|
|
#--- SHARED POSTGRESQL DATABASE ---#
|
|
pg_database: ## CAMBIO ##
|
|
image: postgres:16-alpine
|
|
container_name: shared_postgres_db
|
|
restart: always
|
|
environment:
|
|
# Estas variables son necesarias para la inicialización de la base de datos
|
|
- POSTGRES_USER=${POSTGRES_USER}
|
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
|
- POSTGRES_DB=${N8N_DB_NAME}
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
- ./init-db.sh:/docker-entrypoint-initdb.d/init-db.sh
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
#--- SHARED REDIS CACHE ---#
|
|
redis_cache: ## CAMBIO ##
|
|
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
|