annotate prod/import-usas.sh @ 413:4b0c2c7e213b production v2.15.0

flow: Merged <release> '2.15.0' to <master> ('production').
author Marc Davis <marc.davis@mcoecn.org>
date Fri, 14 Oct 2022 10:20:38 -0400
parents fa23b6f5bb58
children
rev   line source
244
fa23b6f5bb58 DEP-14: fix line endings
smith@nwoca.org
parents: 241
diff changeset
1 #!/bin/bash
fa23b6f5bb58 DEP-14: fix line endings
smith@nwoca.org
parents: 241
diff changeset
2
fa23b6f5bb58 DEP-14: fix line endings
smith@nwoca.org
parents: 241
diff changeset
3 source "$( dirname "${BASH_SOURCE[0]}")/../scripts/.functions.sh"
fa23b6f5bb58 DEP-14: fix line endings
smith@nwoca.org
parents: 241
diff changeset
4
fa23b6f5bb58 DEP-14: fix line endings
smith@nwoca.org
parents: 241
diff changeset
5 docker-compose stop usasapp usasdb
fa23b6f5bb58 DEP-14: fix line endings
smith@nwoca.org
parents: 241
diff changeset
6 resetDbVolume usasdb
fa23b6f5bb58 DEP-14: fix line endings
smith@nwoca.org
parents: 241
diff changeset
7 docker-compose rm -vf usasapp usasdb
fa23b6f5bb58 DEP-14: fix line endings
smith@nwoca.org
parents: 241
diff changeset
8
fa23b6f5bb58 DEP-14: fix line endings
smith@nwoca.org
parents: 241
diff changeset
9 export IMP_IRN=${IMP_IRN}
fa23b6f5bb58 DEP-14: fix line endings
smith@nwoca.org
parents: 241
diff changeset
10 export IMP_URL=${IMP_URL-ftp://username:password@nwoca.org}
fa23b6f5bb58 DEP-14: fix line endings
smith@nwoca.org
parents: 241
diff changeset
11 export IMP_PATH=${IMP_PATH}
fa23b6f5bb58 DEP-14: fix line endings
smith@nwoca.org
parents: 241
diff changeset
12
fa23b6f5bb58 DEP-14: fix line endings
smith@nwoca.org
parents: 241
diff changeset
13 [ -f "docker-compose.override.yml" ] && export OVERRIDE=" -f docker-compose.override.yml"
fa23b6f5bb58 DEP-14: fix line endings
smith@nwoca.org
parents: 241
diff changeset
14 [ -f "docker-compose.usasimport.override.yml" ] && export OVERRIDE2=" -f docker-compose.usasimport.override.yml"
fa23b6f5bb58 DEP-14: fix line endings
smith@nwoca.org
parents: 241
diff changeset
15 #
fa23b6f5bb58 DEP-14: fix line endings
smith@nwoca.org
parents: 241
diff changeset
16 docker-compose -f docker-compose.yml -f ${SSDT_HOME}/prod/import-usas.yml $OVERRIDE rm -f usasimport
fa23b6f5bb58 DEP-14: fix line endings
smith@nwoca.org
parents: 241
diff changeset
17 # start import and wait for completion
fa23b6f5bb58 DEP-14: fix line endings
smith@nwoca.org
parents: 241
diff changeset
18 docker-compose -f docker-compose.yml -f ${SSDT_HOME}/prod/import-usas.yml $OVERRIDE $OVERRIDE2 up usasimport | tee usasimport.log
fa23b6f5bb58 DEP-14: fix line endings
smith@nwoca.org
parents: 241
diff changeset
19 # remove temporary container
fa23b6f5bb58 DEP-14: fix line endings
smith@nwoca.org
parents: 241
diff changeset
20 docker-compose -f docker-compose.yml -f ${SSDT_HOME}/prod/import-usas.yml $OVERRIDE rm -f usasimport
fa23b6f5bb58 DEP-14: fix line endings
smith@nwoca.org
parents: 241
diff changeset
21 # start application
fa23b6f5bb58 DEP-14: fix line endings
smith@nwoca.org
parents: 241
diff changeset
22 docker-compose up -d usasapp
fa23b6f5bb58 DEP-14: fix line endings
smith@nwoca.org
parents: 241
diff changeset
23