changeset 101:13751fd2e40a release/v1.1.0

DEP-12: include override file in import commands
author smith@nwoca.org
date Mon, 10 Apr 2017 20:06:24 +0100
parents 43c423e8f420
children 56796bfabd89
files scripts/import-usps.sh
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/import-usps.sh	Mon Apr 10 18:50:28 2017 +0100
+++ b/scripts/import-usps.sh	Mon Apr 10 20:06:24 2017 +0100
@@ -12,10 +12,12 @@
 export IMP_ANON=${IMP_ANON:--a false}
 export IMP_EM=${IMP_EM-}
 
-docker-compose -f docker-compose.yml -f /ssdt/compose/preview/import-usps.yml rm -f uspsimport
+[ -f "docker-compose.override.yml" ] && export OVERRIDE=" -f docker-compose.override.yml"
+
+docker-compose -f docker-compose.yml -f /ssdt/compose/preview/import-usps.yml $OVERRIDE rm -f uspsimport
 # start import and wait for completion
-docker-compose -f docker-compose.yml -f /ssdt/compose/preview/import-usps.yml up uspsimport | tee uspsimport.log
+docker-compose -f docker-compose.yml -f /ssdt/compose/preview/import-usps.yml $OVERRIDE up uspsimport | tee uspsimport.log
 # remove temporary container
-docker-compose -f docker-compose.yml -f /ssdt/compose/preview/import-usps.yml rm -f uspsimport
+docker-compose -f docker-compose.yml -f /ssdt/compose/preview/import-usps.yml $OVERRIDE rm -f uspsimport
 # start application
 docker-compose up -d uspsapp