n8n_node_librebooking/docker-compose.example.yml

132 lines
3.1 KiB
YAML

# Vollständige Docker Compose Beispiel-Konfiguration
# n8n mit LibreBooking Node - Ready to Use
#
# Verwendung:
# 1. cp docker-compose.example.yml docker-compose.yml
# 2. cp .env.docker .env
# 3. .env Datei anpassen
# 4. docker-compose up -d
version: '3.8'
services:
n8n:
# Verwende das vorgefertigte Image mit LibreBooking Node
build:
context: .
dockerfile: Dockerfile.custom-nodes
args:
N8N_VERSION: latest
# Oder nutze das offizielle Image mit Volume-Mount:
# image: n8nio/n8n:latest
container_name: n8n-librebooking
restart: unless-stopped
ports:
- "${N8N_PORT:-5678}:5678"
environment:
# Basis-Konfiguration
- N8N_HOST=${N8N_HOST:-localhost}
- N8N_PORT=5678
- N8N_PROTOCOL=${N8N_PROTOCOL:-http}
- WEBHOOK_URL=${WEBHOOK_URL:-http://localhost:5678/}
# Authentifizierung (aktivieren für Produktion!)
- N8N_BASIC_AUTH_ACTIVE=${N8N_BASIC_AUTH_ACTIVE:-false}
- N8N_BASIC_AUTH_USER=${N8N_BASIC_AUTH_USER:-admin}
- N8N_BASIC_AUTH_PASSWORD=${N8N_BASIC_AUTH_PASSWORD:-changeme}
# Custom Nodes
- N8N_CUSTOM_EXTENSIONS=/home/node/.n8n/custom
- N8N_COMMUNITY_NODES_ENABLED=true
# Zeitzone
- GENERIC_TIMEZONE=${TZ:-Europe/Berlin}
- TZ=${TZ:-Europe/Berlin}
# Logging
- N8N_LOG_LEVEL=${N8N_LOG_LEVEL:-info}
# Execution Settings
- EXECUTIONS_DATA_SAVE_ON_ERROR=all
- EXECUTIONS_DATA_SAVE_ON_SUCCESS=all
- EXECUTIONS_DATA_SAVE_MANUAL_EXECUTIONS=true
volumes:
# Persistente n8n Daten
- n8n_data:/home/node/.n8n
# Custom Nodes (wenn nicht im Image gebaut)
# - ./custom-nodes:/home/node/.n8n/custom/n8n-nodes-librebooking:ro
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:5678/healthz"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
networks:
- n8n_network
# Optional: PostgreSQL Datenbank für n8n
# Für Produktion empfohlen statt SQLite
postgres:
image: postgres:15-alpine
container_name: n8n-postgres
restart: unless-stopped
profiles:
- with-postgres
environment:
- POSTGRES_USER=${POSTGRES_USER:-n8n}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-n8n_password}
- POSTGRES_DB=${POSTGRES_DB:-n8n}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-n8n}"]
interval: 10s
timeout: 5s
retries: 5
networks:
- n8n_network
# Optional: Redis für Queue Mode
redis:
image: redis:7-alpine
container_name: n8n-redis
restart: unless-stopped
profiles:
- with-redis
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
networks:
- n8n_network
volumes:
n8n_data:
driver: local
postgres_data:
driver: local
redis_data:
driver: local
networks:
n8n_network:
driver: bridge