Mercurial > public > ssdt-docker
annotate prod/import-usas.sh @ 241:fa943a14123d production v2.0.0
flow: Merged <release> 'v2.0.0' to <master> ('production').
author | smith@nwoca.org |
---|---|
date | Wed, 10 Jan 2018 01:45:28 +0000 |
parents | pilot/import-usas.sh@773ec9cc88a9 pilot/import-usas.sh@b390c30aa6c6 |
children | fa23b6f5bb58 |
rev | line source |
---|---|
241
fa943a14123d
flow: Merged <release> 'v2.0.0' to <master> ('production').
smith@nwoca.org
diff
changeset
|
1 #!/bin/bash |
fa943a14123d
flow: Merged <release> 'v2.0.0' to <master> ('production').
smith@nwoca.org
diff
changeset
|
2 |
fa943a14123d
flow: Merged <release> 'v2.0.0' to <master> ('production').
smith@nwoca.org
diff
changeset
|
3 source "$( dirname "${BASH_SOURCE[0]}")/../scripts/.functions.sh" |
fa943a14123d
flow: Merged <release> 'v2.0.0' to <master> ('production').
smith@nwoca.org
diff
changeset
|
4 |
fa943a14123d
flow: Merged <release> 'v2.0.0' to <master> ('production').
smith@nwoca.org
diff
changeset
|
5 docker-compose stop usasapp usasdb |
fa943a14123d
flow: Merged <release> 'v2.0.0' to <master> ('production').
smith@nwoca.org
diff
changeset
|
6 resetDbVolume usasdb |
fa943a14123d
flow: Merged <release> 'v2.0.0' to <master> ('production').
smith@nwoca.org
diff
changeset
|
7 docker-compose rm -vf usasapp usasdb |
fa943a14123d
flow: Merged <release> 'v2.0.0' to <master> ('production').
smith@nwoca.org
diff
changeset
|
8 |
fa943a14123d
flow: Merged <release> 'v2.0.0' to <master> ('production').
smith@nwoca.org
diff
changeset
|
9 export IMP_IRN=${IMP_IRN} |
fa943a14123d
flow: Merged <release> 'v2.0.0' to <master> ('production').
smith@nwoca.org
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
diff
changeset
|
11 export IMP_PATH=${IMP_PATH} |
fa943a14123d
flow: Merged <release> 'v2.0.0' to <master> ('production').
smith@nwoca.org
diff
changeset
|
12 |
fa943a14123d
flow: Merged <release> 'v2.0.0' to <master> ('production').
smith@nwoca.org
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
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
diff
changeset
|
15 # |
fa943a14123d
flow: Merged <release> 'v2.0.0' to <master> ('production').
smith@nwoca.org
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
diff
changeset
|
17 # start import and wait for completion |
fa943a14123d
flow: Merged <release> 'v2.0.0' to <master> ('production').
smith@nwoca.org
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
diff
changeset
|
19 # remove temporary container |
fa943a14123d
flow: Merged <release> 'v2.0.0' to <master> ('production').
smith@nwoca.org
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
diff
changeset
|
21 # start application |
fa943a14123d
flow: Merged <release> 'v2.0.0' to <master> ('production').
smith@nwoca.org
diff
changeset
|
22 docker-compose up -d usasapp |
fa943a14123d
flow: Merged <release> 'v2.0.0' to <master> ('production').
smith@nwoca.org
diff
changeset
|
23 |