Compare commits

...

19 Commits

Author SHA1 Message Date
jjsfunhouse e704d265dd Merge pull request 'Added enterprise functionality' (#8) from jjsfunhouse/nocodb:enterprise-update into main
Reviewed-on: coop-cloud/nocodb#8
2026-03-25 20:34:13 +00:00
jjsfunhouse 860037f7ed Merge branch 'main' into enterprise-update 2026-03-23 20:47:37 +00:00
hey 128ab5eece Added enterprise functionality 2026-03-23 16:27:52 -04:00
fauno 3b5ad84778 chore: publish 2.1.3+0.301.5 release 2026-03-19 09:48:34 -03:00
fauno 43a9d2193a fix: upgrade to 0.301.5 2026-03-19 00:42:14 -03:00
fauno 17e5c38538 chore: publish 2.1.2+0.301.4 release 2026-03-17 12:22:00 -03:00
fauno ac567e2e4c fix: upgrade to 0.301.4 2026-03-17 12:20:01 -03:00
fauno d6e24dbe07 chore: publish 2.1.1+0.301.3 release 2026-02-27 12:42:50 -03:00
fauno 16c29d69a0 fix: upgrade 2026-02-27 12:39:56 -03:00
fauno ba31a3107b chore: publish 2.1.0+0.301.2 release 2026-02-23 11:13:53 -03:00
fauno b8228c1679 Merge pull request 'feat: enable backup-bot-two' (#2) from backups into main
Reviewed-on: coop-cloud/nocodb#2
2026-02-23 14:12:32 +00:00
fauno 68872fd712 Merge branch 'main' into backups 2026-02-23 11:12:13 -03:00
fauno 09b1997b46 Merge branch 'main' into backups 2025-05-05 10:53:46 -03:00
fauno a38f60ddfe Merge branch 'main' into backups 2025-04-30 10:17:36 -03:00
fauno 883ccf5950 Merge branch 'main' into backups 2025-04-14 10:22:07 -03:00
fauno 500bd060af fix: use volume name 2025-04-14 10:15:41 -03:00
fauno ff2d1543a4 Merge branch 'main' into backups 2025-04-14 10:15:12 -03:00
fauno 955c3b2497 fix: abra.sh 2025-01-02 16:57:28 -03:00
fauno c52e9c6744 feat: enable backup-bot-two 2025-01-02 16:48:09 -03:00
7 changed files with 134 additions and 3 deletions
+13
View File
@@ -9,3 +9,16 @@ 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
+9 -1
View File
@@ -9,7 +9,7 @@
* **Status**: 0
* **Image**: [`nocodb`](https://hub.docker.com/r/nocodb), 4, upstream
* **Healthcheck**: No
* **Backups**: No
* **Backups**: Yes
* **Email**: No
* **Tests**: No
* **SSO**: No
@@ -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)`
* `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).
+2
View File
@@ -0,0 +1,2 @@
export PG_BACKUP_VERSION=v1
export NOCODB_ENTRYPOINT_VERSION=v1
+25
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}
+17 -2
View File
@@ -3,7 +3,7 @@ version: "3.8"
services:
app:
image: nocodb/nocodb:0.301.2
image: nocodb/nocodb:0.301.5
secrets:
- nc_db_url
networks:
@@ -28,7 +28,8 @@ services:
#- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect"
#- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true"
#- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
- "coop-cloud.${STACK_NAME}.version=2.0.0+0.301.2"
- "backupbot.backup=${ENABLE_BACKUPS:-true}"
- "coop-cloud.${STACK_NAME}.version=2.1.3+0.301.5"
db:
image: postgres:13.2-alpine
@@ -47,6 +48,16 @@ services:
interval: 10s
timeout: 2s
retries: 10
deploy:
labels:
backupbot.backup: "${ENABLE_BACKUPS:-true}"
backupbot.backup.pre-hook: "/pg_backup.sh backup"
backupbot.backup.volumes.db.path: "backup.sql"
backupbot.restore.post-hook: '/pg_backup.sh restore'
configs:
- source: pg_backup
target: /pg_backup.sh
mode: 0555
volumes:
data:
@@ -65,3 +76,7 @@ secrets:
nc_db_url:
external: true
name: ${STACK_NAME}_nc_db_url_${SECRET_NC_DB_URL_VERSION}
configs:
pg_backup:
name: ${STACK_NAME}_pg_backup_${PG_BACKUP_VERSION}
file: pg_backup.sh
+34
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 "$@"
+34
View File
@@ -0,0 +1,34 @@
#!/bin/bash
set -e
BACKUP_FILE='/var/lib/postgresql/data/backup.sql'
function backup {
export PGPASSWORD=$(cat /run/secrets/db_password)
pg_dump -U ${POSTGRES_USER} ${POSTGRES_DB} > $BACKUP_FILE
}
function restore {
cd /var/lib/postgresql/data/
restore_config(){
# Restore allowed connections
cat pg_hba.conf.bak > pg_hba.conf
su postgres -c 'pg_ctl reload'
}
# Don't allow any other connections than local
cp pg_hba.conf pg_hba.conf.bak
echo "local all all trust" > pg_hba.conf
su postgres -c 'pg_ctl reload'
trap restore_config EXIT INT TERM
# Recreate Database
psql -U ${POSTGRES_USER} -d postgres -c "DROP DATABASE ${POSTGRES_DB} WITH (FORCE);"
createdb -U ${POSTGRES_USER} ${POSTGRES_DB}
psql -U ${POSTGRES_USER} -d ${POSTGRES_DB} -1 -f $BACKUP_FILE
trap - EXIT INT TERM
restore_config
}
$@