annotate prod/import-usas.sh @ 242:d5f4087419e6 production

Added tag v2.0.0 for changeset fa943a14123d
author smith@nwoca.org
date Wed, 10 Jan 2018 01:45:28 +0000
parents fa943a14123d
children fa23b6f5bb58
rev   line source
241
fa943a14123d flow: Merged <release> 'v2.0.0' to <master> ('production').
smith@nwoca.org
parents: 232 235
diff changeset
1 #!/bin/bash
fa943a14123d flow: Merged <release> 'v2.0.0' to <master> ('production').
smith@nwoca.org
parents: 232 235
diff changeset
2
fa943a14123d flow: Merged <release> 'v2.0.0' to <master> ('production').
smith@nwoca.org
parents: 232 235
diff changeset
3 source "$( dirname "${BASH_SOURCE[0]}")/../scripts/.functions.sh"
fa943a14123d flow: Merged <release> 'v2.0.0' to <master> ('production').
smith@nwoca.org
parents: 232 235
diff changeset
4
fa943a14123d flow: Merged <release> 'v2.0.0' to <master> ('production').
smith@nwoca.org
parents: 232 235
diff changeset
5 docker-compose stop usasapp usasdb
fa943a14123d flow: Merged <release> 'v2.0.0' to <master> ('production').
smith@nwoca.org
parents: 232 235
diff changeset
6 resetDbVolume usasdb
fa943a14123d flow: Merged <release> 'v2.0.0' to <master> ('production').
smith@nwoca.org
parents: 232 235
diff changeset
7 docker-compose rm -vf usasapp usasdb
fa943a14123d flow: Merged <release> 'v2.0.0' to <master> ('production').
smith@nwoca.org
parents: 232 235
diff changeset
8
fa943a14123d flow: Merged <release> 'v2.0.0' to <master> ('production').
smith@nwoca.org
parents: 232 235
diff changeset
9 export IMP_IRN=${IMP_IRN}
fa943a14123d flow: Merged <release> 'v2.0.0' to <master> ('production').
smith@nwoca.org
parents: 232 235
diff changeset
10 export IMP_URL=${IMP_URL-ftp://username:password@nwoca.org}
fa943a14123d flow: Merged <release> 'v2.0.0' to <master> ('production').
smith@nwoca.org
parents: 232 235
diff changeset
11 export IMP_PATH=${IMP_PATH}
fa943a14123d flow: Merged <release> 'v2.0.0' to <master> ('production').
smith@nwoca.org
parents: 232 235
diff changeset
12
fa943a14123d flow: Merged <release> 'v2.0.0' to <master> ('production').
smith@nwoca.org
parents: 232 235
diff changeset
13 [ -f "docker-compose.override.yml" ] && export OVERRIDE=" -f docker-compose.override.yml"
fa943a14123d flow: Merged <release> 'v2.0.0' to <master> ('production').
smith@nwoca.org
parents: 232 235
diff changeset
14 [ -f "docker-compose.usasimport.override.yml" ] && export OVERRIDE2=" -f docker-compose.usasimport.override.yml"
fa943a14123d flow: Merged <release> 'v2.0.0' to <master> ('production').
smith@nwoca.org
parents: 232 235
diff changeset
15 #
fa943a14123d flow: Merged <release> 'v2.0.0' to <master> ('production').
smith@nwoca.org
parents: 232 235
diff changeset
16 docker-compose -f docker-compose.yml -f ${SSDT_HOME}/prod/import-usas.yml $OVERRIDE rm -f usasimport
fa943a14123d flow: Merged <release> 'v2.0.0' to <master> ('production').
smith@nwoca.org
parents: 232 235
diff changeset
17 # start import and wait for completion
fa943a14123d flow: Merged <release> 'v2.0.0' to <master> ('production').
smith@nwoca.org
parents: 232 235
diff changeset
18 docker-compose -f docker-compose.yml -f ${SSDT_HOME}/prod/import-usas.yml $OVERRIDE $OVERRIDE2 up usasimport | tee usasimport.log
fa943a14123d flow: Merged <release> 'v2.0.0' to <master> ('production').
smith@nwoca.org
parents: 232 235
diff changeset
19 # remove temporary container
fa943a14123d flow: Merged <release> 'v2.0.0' to <master> ('production').
smith@nwoca.org
parents: 232 235
diff changeset
20 docker-compose -f docker-compose.yml -f ${SSDT_HOME}/prod/import-usas.yml $OVERRIDE rm -f usasimport
fa943a14123d flow: Merged <release> 'v2.0.0' to <master> ('production').
smith@nwoca.org
parents: 232 235
diff changeset
21 # start application
fa943a14123d flow: Merged <release> 'v2.0.0' to <master> ('production').
smith@nwoca.org
parents: 232 235
diff changeset
22 docker-compose up -d usasapp
fa943a14123d flow: Merged <release> 'v2.0.0' to <master> ('production').
smith@nwoca.org
parents: 232 235
diff changeset
23