version: '3.8'

# Whtnxt Self-Hosted Marketing Stack Starter Kit
# Spins up n8n (workflow automation) + NocoDB (Airtable-style database) locally.
# Both run on SQLite by default - zero extra config, good for evaluation and small teams.
# Ports are bound to 127.0.0.1 only, so nothing here is reachable from your LAN or
# the internet until you deliberately put a reverse proxy or tunnel in front of it.
# Change N8N_BASIC_AUTH_PASSWORD before you rely on this beyond local evaluation.
# For a production setup (Postgres, Cloudflare Tunnel, external access), see:
# https://whtnxt.io/blog/self-hosting-nocodb-airtable-alternative

services:
  n8n:
    image: n8nio/n8n:2.29.6
    container_name: n8n
    ports:
      - "127.0.0.1:5678:5678"
    environment:
      - N8N_HOST=localhost
      - N8N_PORT=5678
      - N8N_PROTOCOL=http
      - GENERIC_TIMEZONE=America/Chicago
      - N8N_BASIC_AUTH_ACTIVE=true
      - N8N_BASIC_AUTH_USER=admin
      - N8N_BASIC_AUTH_PASSWORD=change-me-before-exposing
    volumes:
      - n8n_data:/home/node/.n8n
    restart: unless-stopped

  nocodb:
    image: nocodb/nocodb:2026.06.2
    container_name: nocodb
    ports:
      - "127.0.0.1:8080:8080"
    volumes:
      - nocodb_data:/usr/app/data
    restart: unless-stopped

volumes:
  n8n_data:
  nocodb_data:
