Skip to content

Commit 437f2e9

Browse files
Allow to not validate on start
Closes #165
1 parent f829324 commit 437f2e9

File tree

4 files changed

+6
-1
lines changed

4 files changed

+6
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ Most variables are the same as in the [official postgres image](https://hub.dock
8282
| BACKUP_KEEP_MONTHS | Number of monthly backups to keep before removal. Defaults to `6`. |
8383
| BACKUP_KEEP_MINS | Number of minutes for `last` folder backups to keep before removal. Defaults to `1440`. |
8484
| BACKUP_LATEST_TYPE | Type of `latest` pointer (`symlink`,`hardlink`,`none`). Defaults to `symlink`. |
85+
| VALIDATE_ON_START | If set to `FALSE` does not validate the configuration on start. Disabling this is not recommended. Defaults to `TRUE`. |
8586
| HEALTHCHECK_PORT | Port listening for cron-schedule health check. Defaults to `8080`. |
8687
| POSTGRES_DB | Comma or space separated list of postgres databases to backup. If POSTGRES_CLUSTER is set this refers to the database to connect to for dumping global objects and discovering what other databases should be dumped (typically is either `postgres` or `template1`). Required. |
8788
| POSTGRES_DB_FILE | Alternative to POSTGRES_DB, but with one database per line, for usage with docker secrets. |

alpine.Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ ENV POSTGRES_DB="**None**" \
2121
POSTGRES_EXTRA_OPTS="-Z1" \
2222
POSTGRES_CLUSTER="FALSE" \
2323
SCHEDULE="@daily" \
24+
VALIDATE_ON_START="TRUE" \
2425
BACKUP_ON_START="FALSE" \
2526
BACKUP_DIR="/backups" \
2627
BACKUP_SUFFIX=".sql.gz" \

debian.Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ ENV POSTGRES_DB="**None**" \
3535
POSTGRES_EXTRA_OPTS="-Z1" \
3636
POSTGRES_CLUSTER="FALSE" \
3737
SCHEDULE="@daily" \
38+
VALIDATE_ON_START="TRUE" \
3839
BACKUP_ON_START="FALSE" \
3940
BACKUP_DIR="/backups" \
4041
BACKUP_SUFFIX=".sql.gz" \

init.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
set -Eeo pipefail
33

44
# Prevalidate configuration (don't source)
5-
/env.sh
5+
if [ "${VALIDATE_ON_START}" = "TRUE" ]; then
6+
/env.sh
7+
fi
68

79
EXTRA_ARGS=""
810
# Initial background backup

0 commit comments

Comments
 (0)