Added enterprise functionality #8

Merged
jjsfunhouse merged 2 commits from jjsfunhouse/nocodb:enterprise-update into main 2026-03-25 20:34:14 +00:00
5 changed files with 80 additions and 0 deletions

View File

@ -10,3 +10,15 @@ LETS_ENCRYPT_ENV=production
SECRET_DB_PASSWORD_VERSION=v1
SECRET_NC_DB_URL_VERSION=v1
ENABLE_BACKUPS=true
COMPOSE_FILE="compose.yml"
# ---- UNCOMMENT THESE LINES FOR ENTERPRISE VERSION USE ----
#COMPOSE_FILE="$COMPOSE_FILE:compose.license.yml"
# License to enable enterprise features.
#NC_LICENSE_KEY=<YOUR_LICENSE_HERE>
#JWT used for authentication in enterprise version
#SECRET_AUTH_JWT_VERSION=v1
#NC_AUTH_JWT_SECRET_FILE=/run/secrets/auth_jwt
Review

This is unused?

This is unused?
Review

In https://nocodb.com/docs/self-hosting/environment-variables, NocoDB specifies that the NC_AUTH_JWT_SECRET should be set for generating authentication tokens for user sessions. I thought it'd be better for the operator to know this value rather than it being set automatically.

In https://nocodb.com/docs/self-hosting/environment-variables, NocoDB specifies that the `NC_AUTH_JWT_SECRET` should be set for generating authentication tokens for user sessions. I thought it'd be better for the operator to know this value rather than it being set automatically.

View File

@ -25,4 +25,12 @@
* `abra app secret insert <app-name> nc_db_url v1 pg://db:5432?u=nocodb&p=${DATABASE_PW}&d=nocodb`
* `abra app deploy <app-name>`
## NocoDB Enterprise Version
* `abra app config <app-name>`. Uncomment the variables used for setting enterprise values. Make sure you have a valid license.
* `abra app undeploy <app-name>`
* `export JWT_SECRET=$(pwgen 50)`
Review

You can achieve this using the password generator customisation feature:

https://docs.coopcloud.tech/maintainers/handbook/#how-do-i-change-secret-generation-characters

auth_jwt is only included for generation when you do COMPOSE_FILE="$COMPOSE_FILE:compose.license.yml"

You can achieve this using the password generator customisation feature: > https://docs.coopcloud.tech/maintainers/handbook/#how-do-i-change-secret-generation-characters `auth_jwt` is only included for generation when you do `COMPOSE_FILE="$COMPOSE_FILE:compose.license.yml"`
Review

Changed the secret generation in #9 , I just had it like this to follow the trend set by the original recipe but maybe that wasn't ideal. Let me know what you think!

Changed the secret generation in #9 , I just had it like this to follow the trend set by the original recipe but maybe that wasn't ideal. Let me know what you think!
* `abra app secret insert <app-name> auth_jwt v1 ${JWT_SECRET}`
* `abra app deploy <app-name>`
For more, see [`docs.coopcloud.tech`](https://docs.coopcloud.tech).

View File

@ -1 +1,2 @@
export PG_BACKUP_VERSION=v1
export NOCODB_ENTRYPOINT_VERSION=v1

25
compose-license.yml Normal file
View File

@ -0,0 +1,25 @@
version: "3.8"
services:
app:
image: nocodb/nocodb-ee:2026.03.0-pre.01
secrets:
- auth_jwt
configs:
- source: nocodb_entrypoint
target: /entrypoint.sh
mode: 0555
entrypoint: /entrypoint.sh
environment:
NC_LICENSE_KEY: ${NC_LICENSE_KEY}
configs:
nocodb_entrypoint:
name: ${STACK_NAME}_nocodb_entrypoint_${NOCODB_ENTRYPOINT_VERSION}
file: entrypoint.sh.tmpl
template_driver: golang
secrets:
auth_jwt:
external: true
name: ${STACK_NAME}_auth_jwt_${SECRET_AUTH_JWT_VERSION}

34
entrypoint.sh.tmpl Normal file
View File

@ -0,0 +1,34 @@
#!/bin/sh
set -e
echo "Entrypoint running"
file_env() {
var="$1"
fileVar="${var}_FILE"
def="${2:-}"
eval "var_val=\${$var}"
eval "file_val=\${$fileVar}"
if [ -n "$var_val" ] && [ -n "$file_val" ]; then
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
exit 1
fi
val="$def"
if [ -n "$var_val" ]; then
val="$var_val"
elif [ -n "$file_val" ]; then
val="$(cat "$file_val")"
fi
export "$var=$val"
unset "$fileVar"
}
file_env "NC_AUTH_JWT_SECRET"
echo "Added JWT secret"
/usr/bin/dumb-init -- /usr/src/appEntry/start.sh "$@"