- docker-compose: n8n container (port 5678) with PostgreSQL backend - n8n/: 7 TypeScript workflow files + import script + README - Workflows: 4 CMS BI data ingestion + 3 email reports - README: updated with n8n env vars and port - .dockerignore: exclude import.sh from container
77 lines
1.8 KiB
YAML
77 lines
1.8 KiB
YAML
version: "3.8"
|
|
|
|
services:
|
|
app:
|
|
build: .
|
|
container_name: jetour-bi
|
|
ports:
|
|
- "8765:8765"
|
|
environment:
|
|
DB_HOST: db
|
|
DB_PORT: "5432"
|
|
DB_NAME: jetour-bi
|
|
DB_USER: jetour
|
|
DB_PASSWORD: ${DB_PASSWORD:-jetour}
|
|
JWT_SECRET: "${JWT_SECRET:-change-me-in-production}"
|
|
SMTP_HOST: "${SMTP_HOST:-}"
|
|
SMTP_PORT: "${SMTP_PORT:-587}"
|
|
SMTP_USER: "${SMTP_USER:-}"
|
|
SMTP_PASS: "${SMTP_PASS:-}"
|
|
SMTP_FROM: "${SMTP_FROM:-reports@jetour.mu}"
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
|
|
db:
|
|
image: postgres:16-alpine
|
|
container_name: jetour-db
|
|
environment:
|
|
POSTGRES_USER: jetour
|
|
POSTGRES_PASSWORD: ${DB_PASSWORD:-jetour}
|
|
POSTGRES_DB: jetour-bi
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql/data
|
|
ports:
|
|
- "5433:5432"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U jetour -d jetour-bi"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 5
|
|
restart: unless-stopped
|
|
|
|
n8n:
|
|
image: n8nio/n8n:latest
|
|
container_name: jetour-n8n
|
|
ports:
|
|
- "5678:5678"
|
|
environment:
|
|
N8N_ENCRYPTION_KEY: "${N8N_ENCRYPTION_KEY:-change-me-to-a-random-string}"
|
|
DB_TYPE: postgresdb
|
|
DB_POSTGRESDB_HOST: db
|
|
DB_POSTGRESDB_PORT: "5432"
|
|
DB_POSTGRESDB_DATABASE: jetour-bi
|
|
DB_POSTGRESDB_USER: jetour
|
|
DB_POSTGRESDB_PASSWORD: ${DB_PASSWORD:-jetour}
|
|
N8N_HOST: localhost
|
|
N8N_PORT: "5678"
|
|
N8N_PROTOCOL: http
|
|
WEBHOOK_URL: http://localhost:5678/
|
|
volumes:
|
|
- n8n_data:/home/node/.n8n
|
|
- ./n8n:/workflows
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "wget -qO- http://localhost:5678/healthz || exit 1"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
volumes:
|
|
pgdata:
|
|
n8n_data:
|