Compare commits

..

7 Commits

Author SHA1 Message Date
f
9edbda1968 chore: publish 1.1.5+0.263.6 release
All checks were successful
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
2025-06-13 11:10:53 -03:00
f
0ad3582566 fix: upgrade to v0.263.6 2025-06-13 11:09:24 -03:00
f
4c659f90a9 chore: publish 1.1.4+0.263.4 release
All checks were successful
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
2025-05-19 10:05:46 -03:00
f
339b734ed6 fix: upgrade to 0.263.4 2025-05-19 09:59:24 -03:00
f
e8c8431e74 chore: publish 1.1.3+0.263.3 release
All checks were successful
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
2025-05-16 10:12:40 -03:00
f
c267a5287a fix: upgrade to 0.263.3 2025-05-16 09:47:40 -03:00
f
e4ea91688c chore: publish 1.1.2+0.263.1 release
All checks were successful
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
2025-05-05 10:59:04 -03:00
5 changed files with 3 additions and 54 deletions

View File

@ -9,4 +9,3 @@ LETS_ENCRYPT_ENV=production
SECRET_DB_PASSWORD_VERSION=v1
SECRET_NC_DB_URL_VERSION=v1
ENABLE_BACKUPS=true

View File

@ -8,7 +8,7 @@
* **Status**: 0
* **Image**: [`nocodb`](https://hub.docker.com/r/nocodb), 4, upstream
* **Healthcheck**: No
* **Backups**: Yes
* **Backups**: No
* **Email**: No
* **Tests**: No
* **SSO**: No

View File

@ -1 +0,0 @@
export PG_BACKUP_VERSION=v1

View File

@ -3,7 +3,7 @@ version: "3.8"
services:
app:
image: nocodb/nocodb:0.263.1
image: nocodb/nocodb:0.263.6
secrets:
- nc_db_url
networks:
@ -28,8 +28,7 @@ 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}"
- "backupbot.backup=${ENABLE_BACKUPS:-true}"
- "coop-cloud.${STACK_NAME}.version=1.1.1+0.263.0"
- "coop-cloud.${STACK_NAME}.version=1.1.5+0.263.6"
db:
image: postgres:13.2-alpine
@ -48,16 +47,6 @@ 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:
@ -76,7 +65,3 @@ 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

View File

@ -1,34 +0,0 @@
#!/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
}
$@