Mercurial > public > ssdt-docker
annotate scripts/import-usas.sh @ 223:04030a5e355a production v1.6.0
flow: Merged <release> 'v1.6.0' to <master> ('production').
author | smith@nwoca.org |
---|---|
date | Mon, 09 Oct 2017 17:22:23 +0100 |
parents | fea886ba7279 |
children |
rev | line source |
---|---|
44
e5ba33051de7
add scripts and compose file for importing from server
Dave smith <smith@nwoca.org>
parents:
diff
changeset
|
1 #!/bin/bash |
e5ba33051de7
add scripts and compose file for importing from server
Dave smith <smith@nwoca.org>
parents:
diff
changeset
|
2 |
191
fea886ba7279
DEP-12: add source for .functions.sh to all scripts using compose
smith@nwoca.org
parents:
100
diff
changeset
|
3 source "${SSDT_SCRIPTS:-$(dirname "${BASH_SOURCE[0]}")}/.functions.sh" |
73 | 4 |
44
e5ba33051de7
add scripts and compose file for importing from server
Dave smith <smith@nwoca.org>
parents:
diff
changeset
|
5 docker-compose stop usasapp usasdb |
73 | 6 resetDbVolume usasdb |
44
e5ba33051de7
add scripts and compose file for importing from server
Dave smith <smith@nwoca.org>
parents:
diff
changeset
|
7 docker-compose rm -vf usasapp usasdb |
e5ba33051de7
add scripts and compose file for importing from server
Dave smith <smith@nwoca.org>
parents:
diff
changeset
|
8 |
e5ba33051de7
add scripts and compose file for importing from server
Dave smith <smith@nwoca.org>
parents:
diff
changeset
|
9 export IMP_IRN=${IMP_IRN} |
e5ba33051de7
add scripts and compose file for importing from server
Dave smith <smith@nwoca.org>
parents:
diff
changeset
|
10 export IMP_URL=${IMP_URL-ftp://username:password@nwoca.org} |
e5ba33051de7
add scripts and compose file for importing from server
Dave smith <smith@nwoca.org>
parents:
diff
changeset
|
11 export IMP_PATH=${IMP_PATH} |
99
5387d0997596
DEP-12: include override file in import commands
smith@nwoca.org
parents:
94
diff
changeset
|
12 |
100
43c423e8f420
DEP-12: include override file in import commands
smith@nwoca.org
parents:
99
diff
changeset
|
13 [ -f "docker-compose.override.yml" ] && export OVERRIDE=" -f docker-compose.override.yml" |
65
e155908fa039
improve import and training scripts. include all containers in info
smith@nwoca.org
parents:
46
diff
changeset
|
14 # |
99
5387d0997596
DEP-12: include override file in import commands
smith@nwoca.org
parents:
94
diff
changeset
|
15 docker-compose -f docker-compose.yml -f /ssdt/compose/preview/import-usas.yml $OVERRIDE rm -f usasimport |
44
e5ba33051de7
add scripts and compose file for importing from server
Dave smith <smith@nwoca.org>
parents:
diff
changeset
|
16 # start import and wait for completion |
99
5387d0997596
DEP-12: include override file in import commands
smith@nwoca.org
parents:
94
diff
changeset
|
17 docker-compose -f docker-compose.yml -f /ssdt/compose/preview/import-usas.yml $OVERRIDE up usasimport | tee usasimport.log |
44
e5ba33051de7
add scripts and compose file for importing from server
Dave smith <smith@nwoca.org>
parents:
diff
changeset
|
18 # remove temporary container |
99
5387d0997596
DEP-12: include override file in import commands
smith@nwoca.org
parents:
94
diff
changeset
|
19 docker-compose -f docker-compose.yml -f /ssdt/compose/preview/import-usas.yml $OVERRIDE rm -f usasimport |
44
e5ba33051de7
add scripts and compose file for importing from server
Dave smith <smith@nwoca.org>
parents:
diff
changeset
|
20 # start application |
e5ba33051de7
add scripts and compose file for importing from server
Dave smith <smith@nwoca.org>
parents:
diff
changeset
|
21 docker-compose up -d usasapp |
e5ba33051de7
add scripts and compose file for importing from server
Dave smith <smith@nwoca.org>
parents:
diff
changeset
|
22 |