annotate prod/import-usas.sh @ 472:44123bc3d4d4

USASR-5154 try updating
author belknapSSDT <zach.belknap@mcoecn.org>
date Thu, 28 Sep 2023 15:23:35 -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