From 79399b62e827e697ea572ebd13f4e4133224521f Mon Sep 17 00:00:00 2001 From: Alexandra Borovova Date: Fri, 3 May 2024 18:41:52 +0200 Subject: [PATCH] Copy config file during deployment. --- bin/provision.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bin/provision.sh b/bin/provision.sh index a6291b762..bc46208f0 100755 --- a/bin/provision.sh +++ b/bin/provision.sh @@ -19,10 +19,14 @@ if [ "$#" -ne 2 ]; then exit 1 fi -if [ ! -z ${WPT_CONFIG} ]; then - if [ ! -f ${PWD}/config/prod/sync.ini ]; then - echo Please add a sync.ini file to ${PWD}/config/prod +# Config file will be copied from `sync_prod.ini` and updated by default. +# To disable it set WPT_CONFIG=false +if [[ ${WPT_CONFIG} != "false" ]]; then + if [ ! -d ${PWD}/config/prod ]; then + mkdir ${PWD}/config/prod/ fi + cp ${PWD}/sync_prod.ini ${PWD}/config/prod/sync.ini + echo Created config file ${PWD}/config/prod/sync.ini from ${PWD}/sync_prod.ini fi if [ ! -z ${WPT_CREDENTIALS} ]; then