annotate scripts/import-usas.sh @ 75:aa2fd199ba56

improve pid2name script
author smith@nwoca.org
date Wed, 23 Mar 2016 16:39:31 +0100
parents d2c44193fbaa
children 6f8a77d8d58d
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
73
d2c44193fbaa explictly remove db's before import
smith@nwoca.org
parents: 65
diff changeset
3 source "$( dirname "${BASH_SOURCE[0]}")/.functions.sh"
d2c44193fbaa explictly remove db's before import
smith@nwoca.org
parents: 65
diff changeset
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
d2c44193fbaa explictly remove db's before import
smith@nwoca.org
parents: 65
diff changeset
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}
e5ba33051de7 add scripts and compose file for importing from server
Dave smith <smith@nwoca.org>
parents:
diff changeset
12 export IMP_ANON=${IMP_ANON-}
e5ba33051de7 add scripts and compose file for importing from server
Dave smith <smith@nwoca.org>
parents:
diff changeset
13 export IMP_EM=${IMP_EM-}
65
e155908fa039 improve import and training scripts. include all containers in info
smith@nwoca.org
parents: 46
diff changeset
14 #
e155908fa039 improve import and training scripts. include all containers in info
smith@nwoca.org
parents: 46
diff changeset
15 docker-compose -f docker-compose.yml -f /ssdt/compose/preview/import.yml 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
46
dfbb643b82a3 tee import logs to a file
smith@nwoca.org
parents: 44
diff changeset
17 docker-compose -f docker-compose.yml -f /ssdt/compose/preview/import.yml 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
e5ba33051de7 add scripts and compose file for importing from server
Dave smith <smith@nwoca.org>
parents:
diff changeset
19 docker-compose -f docker-compose.yml -f /ssdt/compose/preview/import.yml rm -f usasimport
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