Sign inSign up

nchirea/n8n-db2-sql-agent-ppc64le

By nchirea

•Updated 2 months ago

n8n node to interact with IBM i database.https://github.com/NicolaeCh/n8n-db2fori-sql-agent-ppc64le

Image
0

57

nchirea/n8n-db2-sql-agent-ppc64le repository overview

⁠n8n DB2 for i SQL node (ppc64le)

https://github.com/NicolaeCh/n8n-db2fori-sql-agent-ppc64le⁠ Deployment configuration overview for nchirea/n8n-db2-sql-agent-ppc64le:1.0.0, an optimized Python HTTP service/API built for IBM Power (ppc64le) architectures. It enables n8n and AI workflows to interact with IBM i Db2 databases securely.


⁠Quick Start with Docker Compose

Below is a minimal, production-ready docker-compose.yml for deploying the SQL Agent container.

⁠1. docker-compose.yml
version: "3.8"

services:
  n8n-db2-sql-agent:
    image: nchirea/n8n-db2-sql-agent-ppc64le:1.0.0
    container_name: n8n-db2-sql-agent
    platform: linux/ppc64le
    restart: unless-stopped
    env_file:
      - .env
    ports:
      - "${SQL_AGENT_BIND_ADDRESS:-127.0.0.1}:${SQL_AGENT_PORT:-8080}:8080"
    networks:
      - n8n-db2-agent-net
      - ibmi-monitor-backend
    read_only: true
    tmpfs:
      - /tmp:size=64m,mode=1777
    cap_drop:
      - ALL
    security_opt:
      - no-new-privileges:true
    stop_grace_period: 30s
    healthcheck:
      test:
        - CMD
        - python
        - -c
        - import urllib.request; urllib.request.urlopen('http://127.0.0.1:8080/health/live', timeout=3)
      interval: 30s
      timeout: 5s
      retries: 3
      start_period: 20s

networks:
  n8n-db2-agent-net:
    name: n8n-db2-sql-agent
    driver: bridge

  ibmi-monitor-backend:
    external: true
    name: ibmi-monitor-ai_backend-net

⁠2. Environment Configuration (.env)

Create a .env file in the same directory as your docker-compose.yml:

# Server Settings
SQL_AGENT_BIND_ADDRESS=0.0.0.0
SQL_AGENT_PORT=8080

# IBM i Db2 Connection Settings
DB2_HOST=your_ibmi_host_or_ip
DB2_PORT=8076
DB2_USER=your_ibmi_user
DB2_PASSWORD=your_ibmi_password
DB2_SCHEMA=QGPL

# API Security
SQL_AGENT_API_KEY=your_secure_api_key

⁠3. Deployment Instructions

  1. Ensure the external network exists: Since the configuration references an external network (ibmi-monitor-ai_backend-net), verify or create it before starting:

    docker network create ibmi-monitor-ai_backend-net || true
    
  2. Start the Service: Run the following command to deploy the agent in detached mode:

    docker compose up -d
    
  3. Verify Service Health: Check the container logs and health status:

    docker compose ps
    docker logs n8n-db2-sql-agent
    
  4. Health Check Endpoint: The service exposes a live health probe at:

    http://<host-ip>:8080/health/live
    

⁠Security Features Included

  • Read-Only Root Filesystem: read_only: true prevents unauthorized file modifications.
  • Non-Root / Minimal Privileges: cap_drop: [ALL] and no-new-privileges:true ensure strict container isolation.
  • Temporary Storage: Mounted a lightweight tmpfs at /tmp for essential runtime operations.

Tag summary

Content type

Image

Digest

sha256:6e236f79b…

Size

399.1 MB

Last updated

2 months ago

docker pull nchirea/n8n-db2-sql-agent-ppc64le:1.0.0