Skip to content

Commit

Permalink
Pass "USE_WAL_E" to PostgreSQL container, remove redundant "USE_WAL_E…
Browse files Browse the repository at this point in the history
…_BACKUP" variable
  • Loading branch information
noliveleger committed Oct 29, 2020
1 parent 8ddf5df commit a6c4636
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
3 changes: 1 addition & 2 deletions helpers/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,7 @@ def _get_value(property_, true_value="", false_value="#",
"REDIS_MAIN_PORT": config.get("redis_main_port", "6739"),
"REDIS_CACHE_PORT": config.get("redis_cache_port", "6380"),
"USE_BACKUP": "" if config.get("use_backup") == Config.TRUE else "#",
"USE_WAL_E_BACKUP": _get_value("use_wal_e"),
"USE_WAL_E": config.get("use_wal_e"),
"USE_WAL_E": _get_value("use_wal_e"),
"USE_AWS_BACKUP": "" if config_object.aws and
config.get("use_backup") == Config.TRUE and
config.get("aws_backup_bucket_name") != "" else "#",
Expand Down
3 changes: 3 additions & 0 deletions templates/kobo-env/envfiles/databases.txt.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ KOBO_POSTGRES_PRIMARY_ENDPOINT=primary.postgres.${PRIVATE_DOMAIN_NAME}
# Default Postgres backup schedule is weekly at 02:00 AM UTC on Sunday.
${USE_BACKUP}POSTGRES_BACKUP_SCHEDULE=${POSTGRES_BACKUP_SCHEDULE}

# WAL-E archiving and backup support
{USE_WAL_E_BACKUP}USE_WAL_E=1

#--------------------------------------------------------------------------------
# REDIS
#--------------------------------------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions templates/kobo-env/postgres/primary/postgres.conf.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@

${POSTGRES_SETTINGS}

${USE_WAL_E_BACKUP}archive_mode = on
${USE_WAL_E_BACKUP}archive_command = 'envdir $$PGDATA/wal-e.d/env wal-e wal-push %p'
${USE_WAL_E_BACKUP}archive_timeout = 60
${USE_WAL_E}archive_mode = on
${USE_WAL_E}archive_command = 'envdir $$PGDATA/wal-e.d/env wal-e wal-push %p'
${USE_WAL_E}archive_timeout = 60

0 comments on commit a6c4636

Please sign in to comment.