NocoDB
lastmod 2025-02-14created 2021-05-2819 edits
Open Source Airtable Alternative.
NocoDB is an open source NoCode platform that turns any database into a smart spreadsheet.
Features
- AGPL-3.0 License
Demo
Healthcheck
/api/v1/db/meta/nocodb/info
{"authType":"jwt","projectHasAdmin":true,"firstUser":false,"type":"rest","googleAuthEnabled":false,"githubAuthEnabled":false,"oneClick":false,"connectToExternalDB":true,"version":"0.90.11","defaultLimit":25,"ncMin":false,"teleEnabled":true,"ncSiteUrl":"http://table.server.com"}
/api/v1/db/meta/nocodb/version
Installation
version: '2.1'
services:
root_db:
image: postgres
restart: always
volumes:
- db_data:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: password
POSTGRES_USER: postgres
POSTGRES_DB: root_db
healthcheck:
test: pg_isready -U "$$POSTGRES_USER" -d "$$POSTGRES_DB"
interval: 10s
timeout: 2s
retries: 10
nocodb:
depends_on:
root_db:
condition: service_healthy
image: nocodb/nocodb:latest
ports:
- "8080:8080"
restart: always
volumes:
- nc_data:/usr/app/data
environment:
NC_DB: "pg://root_db:5432?u=postgres&p=password&d=root_db"
healthcheck:
test:
- node
- -e
- "require(\"http\").get(\"http://localhost:8080/api/v1/db/meta/nocodb/version\", res => res.statusCode === 200 ? process.exit(0) : process.exit(1));"
interval: 10s
timeout: 2s
retries: 10
volumes:
db_data: {}
nc_data: {}
Configuration
- NC_INVITE_ONLY_SIGNUP=yes
- Allows users to sign up only through an invite URL.
Troubleshooting
getaddrinfo ENOTFOUND
Using docker-compose directly works fine, but running it on swarm gives a network error like this.
Error: getaddrinfo ENOTFOUND db
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:66:26) {
errno: 'ENOTFOUND',
code: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: 'db'
}
Just find the container with docker container ps and reboot it with docker container restart. Probably because docker's network connection comes up late. Maybe add a delay to the startup later?
Recovering an accidentally deleted table
To get straight to the point: there is no way.
Connecting with psql and checking the nc_projects_v2 table shows the following:
root_db=# select * from nc_projects_v2;
id | title | prefix |
------------------+--------------------+-----------+
p_dyfb2n5ij86pn2 | DevTeam | nc_qndu__ |
...
Checking the tables registered with the desired project's prefix tells you whether the table exists, but it was not there...
root_db-# \dt
List of relations
Schema | Name | Type | Owner
--------+----------------------------------+-------+----------
public | nc_1uuy__weekly_report | table | yourname
...
public | nc_projects_v2 | table | yourname
public | nc_qndu__answer_relase | table | yourname
...
(nc_qndu__answer_relase is there, but the one I wanted was not)
On top of that, I exported the sql with pg_dump and checked, and it was not there either.
See also
- Microsoft Excel
- ROAPI - Create APIs for static datasets without writing a single line of code.
- Airtable
- Baserow
- APITable - Open-source alternative to AirTable
- undb - Open-source no-code database
- React Datasheet Grid - A spreadsheet component similar to Airtable/Excel
- IronCalc – Open-source spreadsheet engine