From 108daca1fe1845a0d601b9b562d53beeb06bafd8 Mon Sep 17 00:00:00 2001 From: Yury Kossakovsky Date: Thu, 25 Dec 2025 11:27:00 -0700 Subject: [PATCH] feat: add nocodb as optional service add nocodb (open source airtable alternative) with: - docker service definition with postgresql backend - caddy reverse proxy configuration - jwt secret auto-generation - wizard integration for service selection - welcome page dashboard entry - readme and changelog updates --- .env.example | 9 +++++++++ CHANGELOG.md | 1 + Caddyfile | 5 +++++ README.md | 3 +++ docker-compose.yml | 34 +++++++++++++++++++++++++++++--- scripts/03_generate_secrets.sh | 1 + scripts/04_wizard.sh | 1 + scripts/generate_welcome_page.sh | 14 +++++++++++++ welcome/app.js | 8 ++++++++ 9 files changed, 73 insertions(+), 3 deletions(-) diff --git a/.env.example b/.env.example index c9f9b3f..84a29f0 100644 --- a/.env.example +++ b/.env.example @@ -92,6 +92,14 @@ NEO4J_AUTH_USERNAME=neo4j NEO4J_AUTH_PASSWORD= +############ +# [required] +# NocoDB JWT Secret (auto-generated) +############ + +NOCODB_JWT_SECRET= + + ############ # [required] # Langfuse credentials @@ -152,6 +160,7 @@ LIGHTRAG_HOSTNAME=lightrag.yourdomain.com LT_HOSTNAME=translate.yourdomain.com N8N_HOSTNAME=n8n.yourdomain.com NEO4J_HOSTNAME=neo4j.yourdomain.com +NOCODB_HOSTNAME=nocodb.yourdomain.com PADDLEOCR_HOSTNAME=paddleocr.yourdomain.com PORTAINER_HOSTNAME=portainer.yourdomain.com POSTGRESUS_HOSTNAME=postgresus.yourdomain.com diff --git a/CHANGELOG.md b/CHANGELOG.md index ee89e32..ad0a83d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ All notable changes to this project are documented in this file. ### Added - **Anonymous Telemetry** - Optional usage analytics via Scarf (opt-out with `SCARF_ANALYTICS=false`) +- **NocoDB** - Open source Airtable alternative with spreadsheet database interface - **Gost Proxy** - HTTP/HTTPS proxy for AI services outbound traffic (geo-bypass) - **Welcome Page** - Post-install dashboard with service credentials and quick start - **Makefile** - Common project commands (`make install`, `make update`, `make logs`, `make status`, etc.) diff --git a/Caddyfile b/Caddyfile index 65c2c5b..3b0df0e 100644 --- a/Caddyfile +++ b/Caddyfile @@ -132,6 +132,11 @@ https://{$NEO4J_HOSTNAME}:7687 { reverse_proxy neo4j:7687 } +# NocoDB +{$NOCODB_HOSTNAME} { + reverse_proxy nocodb:8080 +} + # PaddleOCR (PaddleX Basic Serving) {$PADDLEOCR_HOSTNAME} { basic_auth { diff --git a/README.md b/README.md index 5eb5c6a..e3ec69b 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,8 @@ The installer also makes the following powerful open-source tools **available fo ✅ [**Neo4j**](https://neo4j.com/) - A graph database management system that allows you to model, store, and query data as a network of nodes and relationships. +✅ [**NocoDB**](https://nocodb.com/) - An open source Airtable alternative that turns any database into a smart spreadsheet with a no-code interface for building collaborative apps. + ✅ [**Ollama**](https://ollama.com/) - Run Llama 3, Mistral, Gemma, and other large language models locally. ✅ [**Open WebUI**](https://openwebui.com/) - A user-friendly, ChatGPT-like interface to interact privately with your AI models and n8n agents. @@ -154,6 +156,7 @@ After successful installation, your services are up and running! Here's how to g - **Letta:** `letta.yourdomain.com` - **LibreTranslate:** `translate.yourdomain.com` - **Neo4j:** `neo4j.yourdomain.com` + - **NocoDB:** `nocodb.yourdomain.com` - **Open WebUI:** `webui.yourdomain.com` - **PaddleOCR:** `paddleocr.yourdomain.com` - **Portainer:** `portainer.yourdomain.com` (Protected by Caddy basic auth; on first login, complete Portainer admin setup) diff --git a/docker-compose.yml b/docker-compose.yml index 4593c4c..cf600c4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,6 +15,7 @@ volumes: lightrag_data: lightrag_inputs: n8n_storage: + nocodb_data: ollama_storage: open-webui: paddle_cache: @@ -267,6 +268,32 @@ services: soft: 40000 hard: 40000 + nocodb: + image: nocodb/nocodb:latest + container_name: nocodb + profiles: ["nocodb"] + restart: unless-stopped + logging: + driver: "json-file" + options: + max-size: "1m" + max-file: "1" + environment: + NC_AUTH_JWT_SECRET: ${NOCODB_JWT_SECRET} + NC_DB: pg://postgres:5432?u=postgres&p=${POSTGRES_PASSWORD}&d=nocodb + NC_PUBLIC_URL: https://${NOCODB_HOSTNAME} + volumes: + - nocodb_data:/usr/app/data + healthcheck: + test: ["CMD-SHELL", "wget -qO- http://localhost:8080/api/v2/health || exit 1"] + interval: 30s + timeout: 10s + retries: 5 + start_period: 30s + depends_on: + postgres: + condition: service_healthy + caddy: container_name: caddy image: docker.io/library/caddy:2-alpine @@ -300,6 +327,7 @@ services: LT_USERNAME: ${LT_USERNAME} N8N_HOSTNAME: ${N8N_HOSTNAME} NEO4J_HOSTNAME: ${NEO4J_HOSTNAME} + NOCODB_HOSTNAME: ${NOCODB_HOSTNAME} PADDLEOCR_HOSTNAME: ${PADDLEOCR_HOSTNAME} PADDLEOCR_PASSWORD_HASH: ${PADDLEOCR_PASSWORD_HASH} PADDLEOCR_USERNAME: ${PADDLEOCR_USERNAME} @@ -753,7 +781,7 @@ services: environment: <<: *proxy-env BACKEND_INTERNAL_URL: http://postiz:3000 - DATABASE_URL: "postgresql://postgres:${POSTGRES_PASSWORD}@postgres:5432/postiz" + DATABASE_URL: "postgresql://postgres:${POSTGRES_PASSWORD}@postgres:5432/postgres?schema=postiz" DISABLE_REGISTRATION: ${POSTIZ_DISABLE_REGISTRATION} FRONTEND_URL: ${POSTIZ_HOSTNAME:+https://}${POSTIZ_HOSTNAME} IS_GENERAL: "true" # Required for self-hosting. @@ -902,7 +930,7 @@ services: WAHA_DASHBOARD_PASSWORD: ${WAHA_DASHBOARD_PASSWORD} WAHA_DASHBOARD_USERNAME: ${WAHA_DASHBOARD_USERNAME} WAHA_ENGINE: ${WAHA_ENGINE} - WHATSAPP_SESSIONS_POSTGRESQL_URL: postgres://postgres:${POSTGRES_PASSWORD}@postgres:5432/waha?sslmode=disable + WHATSAPP_SESSIONS_POSTGRESQL_URL: postgres://postgres:${POSTGRES_PASSWORD}@postgres:5432/postgres?sslmode=disable WHATSAPP_SWAGGER_ENABLED: ${WHATSAPP_SWAGGER_ENABLED:-true} WHATSAPP_SWAGGER_PASSWORD: ${WHATSAPP_SWAGGER_PASSWORD} WHATSAPP_SWAGGER_USERNAME: ${WHATSAPP_SWAGGER_USERNAME} @@ -1108,7 +1136,7 @@ services: POSTGRES_PORT: 5432 POSTGRES_USER: postgres POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} - POSTGRES_DATABASE: lightrag + POSTGRES_DATABASE: postgres POSTGRES_MAX_CONNECTIONS: 12 POSTGRES_VECTOR_INDEX_TYPE: HNSW POSTGRES_HNSW_M: 16 diff --git a/scripts/03_generate_secrets.sh b/scripts/03_generate_secrets.sh index af788ab..d46a167 100755 --- a/scripts/03_generate_secrets.sh +++ b/scripts/03_generate_secrets.sh @@ -97,6 +97,7 @@ declare -A VARS_TO_GENERATE=( ["NEO4J_AUTH_PASSWORD"]="password:32" # Added Neo4j password ["NEO4J_AUTH_USERNAME"]="fixed:neo4j" # Added Neo4j username ["NEXTAUTH_SECRET"]="secret:64" # base64 encoded, 48 bytes -> 64 chars + ["NOCODB_JWT_SECRET"]="secret:64" # NocoDB authentication JWT secret ["PADDLEOCR_PASSWORD"]="password:32" # Added PaddleOCR basic auth password ["PG_META_CRYPTO_KEY"]="alphanum:32" ["POSTGRES_NON_ROOT_PASSWORD"]="password:32" diff --git a/scripts/04_wizard.sh b/scripts/04_wizard.sh index 3f66fb2..25a0bec 100755 --- a/scripts/04_wizard.sh +++ b/scripts/04_wizard.sh @@ -53,6 +53,7 @@ base_services_data=( "monitoring" "Monitoring Suite (Prometheus, Grafana, cAdvisor, Node-Exporter)" "n8n" "n8n, n8n-worker, n8n-import (Workflow Automation)" "neo4j" "Neo4j (Graph Database)" + "nocodb" "NocoDB (Open Source Airtable Alternative - Spreadsheet Database)" "ollama" "Ollama (Local LLM Runner - select hardware in next step)" "open-webui" "Open WebUI (ChatGPT-like Interface)" "paddleocr" "PaddleOCR (OCR API Server)" diff --git a/scripts/generate_welcome_page.sh b/scripts/generate_welcome_page.sh index 2c5e31c..1a44715 100755 --- a/scripts/generate_welcome_page.sh +++ b/scripts/generate_welcome_page.sh @@ -178,6 +178,20 @@ if is_profile_active "neo4j"; then }") fi +# NocoDB +if is_profile_active "nocodb"; then + SERVICES_ARRAY+=(" \"nocodb\": { + \"hostname\": \"$(json_escape "$NOCODB_HOSTNAME")\", + \"credentials\": { + \"note\": \"Create your account on first login\" + }, + \"extra\": { + \"internal_api\": \"http://nocodb:8080\", + \"docs\": \"https://docs.nocodb.com\" + } + }") +fi + # SearXNG if is_profile_active "searxng"; then SERVICES_ARRAY+=(" \"searxng\": { diff --git a/welcome/app.js b/welcome/app.js index 783da61..de22b99 100644 --- a/welcome/app.js +++ b/welcome/app.js @@ -247,6 +247,14 @@ category: 'database', docsUrl: 'https://neo4j.com/docs' }, + 'nocodb': { + name: 'NocoDB', + description: 'Spreadsheet Database', + icon: 'NC', + color: 'bg-[#3433C1]', + category: 'database', + docsUrl: 'https://nocodb.com/docs/product-docs' + }, 'searxng': { name: 'SearXNG', description: 'Private Metasearch Engine',