Files
boti/templates/docker-compose.yml
2026-03-07 19:33:48 +01:00

64 lines
1.6 KiB
YAML

services:
postgres:
image: pgvector/pgvector:pg16
container_name: customer-postgres
restart: unless-stopped
environment:
POSTGRES_DB: ${PG_DB}
POSTGRES_USER: ${PG_USER}
POSTGRES_PASSWORD: ${PG_PASSWORD}
volumes:
- ./volumes/postgres/data:/var/lib/postgresql/data
- ./sql:/docker-entrypoint-initdb.d:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${PG_USER} -d ${PG_DB} || exit 1"]
interval: 10s
timeout: 5s
retries: 20
networks:
- customer-net
n8n:
image: n8nio/n8n:latest
container_name: n8n
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
ports:
- "${N8N_PORT}:5678"
environment:
# --- Web / Cookies / URL ---
N8N_PORT: 5678
N8N_PROTOCOL: ${N8N_PROTOCOL}
N8N_HOST: ${N8N_HOST}
N8N_EDITOR_BASE_URL: ${N8N_EDITOR_BASE_URL}
WEBHOOK_URL: ${WEBHOOK_URL}
# Ohne TLS/Reverse Proxy: sonst Secure-Cookie Warning / Login-Probleme
N8N_SECURE_COOKIE: ${N8N_SECURE_COOKIE}
# --- DB (Postgres) ---
DB_TYPE: postgresdb
DB_POSTGRESDB_HOST: postgres
DB_POSTGRESDB_PORT: 5432
DB_POSTGRESDB_DATABASE: ${PG_DB}
DB_POSTGRESDB_USER: ${PG_USER}
DB_POSTGRESDB_PASSWORD: ${PG_PASSWORD}
# --- Basics ---
GENERIC_TIMEZONE: Europe/Berlin
TZ: Europe/Berlin
# optional (später hart machen)
N8N_ENCRYPTION_KEY: ${N8N_ENCRYPTION_KEY}
volumes:
- ./volumes/n8n-data:/home/node/.n8n
networks:
- customer-net
networks:
customer-net:
driver: bridge