From 1f458fdf53912cd3e3529649cdc0d297e4701d82 Mon Sep 17 00:00:00 2001 From: Jainil Prajapati <86187588+jaainil@users.noreply.github.com> Date: Sun, 5 Oct 2025 09:48:20 +0530 Subject: [PATCH] chore(deps): update dependencies and improve NocoDB configuration (#359) * chore(deps): update dependencies and improve NocoDB configuration - Update vite-plugin-static-copy from 2.3.0 to 2.3.2 - Update Vite from 6.3.5 to 6.3.6 - Change NocoDB Docker image to use latest tag instead of specific version - Update PostgreSQL from 17 to 16.6 for better stability - Improve NocoDB configuration with proper environment variables - Add proper volume mounts for data persistence - Update healthcheck configuration for PostgreSQL service - Update NocoDB port from 8000 to 8080 in configuration * fix(docker-compose): improve healthcheck and formatting for nocodb service --- app/package-lock.json | 16 ++++++++------ app/package.json | 2 +- blueprints/nocodb/docker-compose.yml | 32 +++++++++++++++++----------- blueprints/nocodb/template.toml | 23 ++++++++++++++------ meta.json | 2 +- 5 files changed, 47 insertions(+), 28 deletions(-) diff --git a/app/package-lock.json b/app/package-lock.json index e022d54b..9579d3d9 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -37,7 +37,7 @@ "tailwind-merge": "^3.0.2", "tailwindcss": "^4.0.12", "tailwindcss-animate": "^1.0.7", - "vite-plugin-static-copy": "2.3.0", + "vite-plugin-static-copy": "^2.3.2", "yaml": "2.7.1", "zustand": "^5.0.3" }, @@ -4101,10 +4101,11 @@ } }, "node_modules/vite": { - "version": "6.3.5", - "resolved": "https://registry.npmjs.org/vite/-/vite-6.3.5.tgz", - "integrity": "sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==", + "version": "6.3.6", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.3.6.tgz", + "integrity": "sha512-0msEVHJEScQbhkbVTb/4iHZdJ6SXp/AvxL2sjwYQFfBqleHtnCqv1J3sa9zbWz/6kW1m9Tfzn92vW+kZ1WV6QA==", "dev": true, + "license": "MIT", "dependencies": { "esbuild": "^0.25.0", "fdir": "^6.4.4", @@ -4175,9 +4176,10 @@ } }, "node_modules/vite-plugin-static-copy": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/vite-plugin-static-copy/-/vite-plugin-static-copy-2.3.0.tgz", - "integrity": "sha512-LLKwhhHetGaCnWz4mas4qqjjguDka6/6b4+SeIohRroj8aCE7QTfiZECfPecslFQkWZ3HdQuq5kOPmWZjNYlKA==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/vite-plugin-static-copy/-/vite-plugin-static-copy-2.3.2.tgz", + "integrity": "sha512-iwrrf+JupY4b9stBttRWzGHzZbeMjAHBhkrn67MNACXJVjEMRpCI10Q3AkxdBkl45IHaTfw/CNVevzQhP7yTwg==", + "license": "MIT", "dependencies": { "chokidar": "^3.5.3", "fast-glob": "^3.2.11", diff --git a/app/package.json b/app/package.json index 49503ad8..b8a8e6ca 100644 --- a/app/package.json +++ b/app/package.json @@ -39,7 +39,7 @@ "tailwind-merge": "^3.0.2", "tailwindcss": "^4.0.12", "tailwindcss-animate": "^1.0.7", - "vite-plugin-static-copy": "2.3.0", + "vite-plugin-static-copy": "^2.3.2", "yaml": "2.7.1", "zustand": "^5.0.3" }, diff --git a/blueprints/nocodb/docker-compose.yml b/blueprints/nocodb/docker-compose.yml index 7c4fd1e9..bbaab749 100644 --- a/blueprints/nocodb/docker-compose.yml +++ b/blueprints/nocodb/docker-compose.yml @@ -1,30 +1,36 @@ -version: "3.8" services: nocodb: - image: nocodb/nocodb:0.257.2 + image: nocodb/nocodb:latest restart: always + depends_on: + root_db: + condition: service_healthy environment: - NC_DB: "pg://root_db?u=postgres&p=password&d=root_db" - PORT: ${NOCODB_PORT} - NC_REDIS_URL: ${NC_REDIS_URL} + # Reuses DB env from template.toml / .env + NC_DB: "pg://root_db:5432?u=${POSTGRES_USER}&p=${POSTGRES_PASSWORD}&d=${POSTGRES_DB}" volumes: - nc_data:/usr/app/data root_db: - image: postgres:17 + image: postgres:16.6 restart: always - environment: - POSTGRES_DB: root_db - POSTGRES_PASSWORD: password - POSTGRES_USER: postgres + POSTGRES_DB: ${POSTGRES_DB} + POSTGRES_USER: ${POSTGRES_USER} + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} + # More reliable healthcheck: healthcheck: + test: + [ + "CMD-SHELL", + 'pg_isready -h 127.0.0.1 -U "$POSTGRES_USER" -d "$POSTGRES_DB"', + ] interval: 10s + timeout: 5s + start_period: 20s retries: 10 - test: 'pg_isready -U "$$POSTGRES_USER" -d "$$POSTGRES_DB"' - timeout: 2s volumes: - - "db_data:/var/lib/postgresql/data" + - db_data:/var/lib/postgresql/data volumes: db_data: {} diff --git a/blueprints/nocodb/template.toml b/blueprints/nocodb/template.toml index 36d19d82..ab24e1e2 100644 --- a/blueprints/nocodb/template.toml +++ b/blueprints/nocodb/template.toml @@ -1,15 +1,26 @@ [variables] main_domain = "${domain}" -jwt_secret = "${base64:64}" +postgres_user = "postgres" +postgres_password = "${password:32}" +postgres_db = "root_db" [config] -mounts = [] - [[config.domains]] serviceName = "nocodb" -port = 8_000 +port = 8080 host = "${main_domain}" [config.env] -NOCODB_PORT = "8000" -NC_AUTH_JWT_SECRET = "${jwt_secret}" +POSTGRES_USER = "${postgres_user}" +POSTGRES_PASSWORD = "${postgres_password}" +POSTGRES_DB = "${postgres_db}" + +[[config.mounts]] +serviceName = "nocodb" +volumeName = "nc_data" +mountPath = "/usr/app/data" + +[[config.mounts]] +serviceName = "root_db" +volumeName = "db_data" +mountPath = "/var/lib/postgresql/data" diff --git a/meta.json b/meta.json index cd2212cf..17b75f4d 100644 --- a/meta.json +++ b/meta.json @@ -3560,7 +3560,7 @@ { "id": "nocodb", "name": "NocoDB", - "version": "0.257.2", + "version": "latest", "description": "NocoDB is an opensource Airtable alternative that turns any MySQL, PostgreSQL, SQL Server, SQLite & MariaDB into a smart spreadsheet.", "links": { "github": "https://github.com/nocodb/nocodb",