Compare commits
2 Commits
6.8.2+v1.1
...
6.8.3+v1.1
| Author | SHA1 | Date | |
|---|---|---|---|
| 18b658c452 | |||
| 553fee0e9d |
2
abra.sh
2
abra.sh
@ -8,7 +8,7 @@ export TELEGRAM_BRIDGE_YAML_VERSION=v6
|
||||
export NGINX_CONFIG_VERSION=v12
|
||||
export WK_SERVER_VERSION=v1
|
||||
export WK_CLIENT_VERSION=v1
|
||||
export PG_BACKUP_VERSION=v1
|
||||
export PG_BACKUP_VERSION=v2
|
||||
export ADMIN_CONFIG_VERSION=v1
|
||||
|
||||
set_admin () {
|
||||
|
||||
@ -106,7 +106,7 @@ services:
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
labels:
|
||||
- "coop-cloud.${STACK_NAME}.version=6.8.2+v1.139.2"
|
||||
- "coop-cloud.${STACK_NAME}.version=6.8.3+v1.139.2"
|
||||
- "coop-cloud.${STACK_NAME}.timeout=${TIMEOUT}"
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8008/health"]
|
||||
|
||||
@ -6,7 +6,7 @@ BACKUP_FILE='/var/lib/postgresql/data/backup.sql'
|
||||
|
||||
function backup {
|
||||
export PGPASSWORD=$(cat $POSTGRES_PASSWORD_FILE)
|
||||
pg_dump -U ${POSTGRES_USER} ${POSTGRES_DB} > $BACKUP_FILE
|
||||
pg_dump -U ${POSTGRES_USER} ${POSTGRES_DB} | gzip > $BACKUP_FILE
|
||||
}
|
||||
|
||||
function restore {
|
||||
@ -25,7 +25,7 @@ function restore {
|
||||
# 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
|
||||
gunzip -c $BACKUP_FILE | psql -U ${POSTGRES_USER} -d ${POSTGRES_DB} -1 -f -
|
||||
|
||||
trap - EXIT INT TERM
|
||||
restore_config
|
||||
|
||||
Reference in New Issue
Block a user