annotate scripts/import-usps.sh @ 523:9284ecfe940b production v2.16.1

flow: Merged <hotfix> '2.16.1' to <master> ('production').
author Marc Davis <marc.davis@mcoecn.org>
date Tue, 30 Jan 2024 10:55:04 -0500
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: 101
diff changeset
3 source "${SSDT_SCRIPTS:-$(dirname "${BASH_SOURCE[0]}")}/.functions.sh"
73
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 uspsapp uspsdb
73
d2c44193fbaa explictly remove db's before import
smith@nwoca.org
parents: 65
diff changeset
6 resetDbVolume uspsdb
44
e5ba33051de7 add scripts and compose file for importing from server
Dave smith <smith@nwoca.org>
parents:
diff changeset
7 docker-compose rm -vf uspsapp uspsdb
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}
45
dc40a6ed0af3 add default for usps anonymous
Dave smith <smith@nwoca.org>
parents: 44
diff changeset
12 export IMP_ANON=${IMP_ANON:--a false}
44
e5ba33051de7 add scripts and compose file for importing from server
Dave smith <smith@nwoca.org>
parents:
diff changeset
13 export IMP_EM=${IMP_EM-}
e5ba33051de7 add scripts and compose file for importing from server
Dave smith <smith@nwoca.org>
parents:
diff changeset
14
101
13751fd2e40a DEP-12: include override file in import commands
smith@nwoca.org
parents: 94
diff changeset
15 [ -f "docker-compose.override.yml" ] && export OVERRIDE=" -f docker-compose.override.yml"
13751fd2e40a DEP-12: include override file in import commands
smith@nwoca.org
parents: 94
diff changeset
16
13751fd2e40a 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-usps.yml $OVERRIDE rm -f uspsimport
44
e5ba33051de7 add scripts and compose file for importing from server
Dave smith <smith@nwoca.org>
parents:
diff changeset
18 # start import and wait for completion
101
13751fd2e40a 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-usps.yml $OVERRIDE up uspsimport | tee uspsimport.log
44
e5ba33051de7 add scripts and compose file for importing from server
Dave smith <smith@nwoca.org>
parents:
diff changeset
20 # remove temporary container
101
13751fd2e40a DEP-12: include override file in import commands
smith@nwoca.org
parents: 94
diff changeset
21 docker-compose -f docker-compose.yml -f /ssdt/compose/preview/import-usps.yml $OVERRIDE rm -f uspsimport
44
e5ba33051de7 add scripts and compose file for importing from server
Dave smith <smith@nwoca.org>
parents:
diff changeset
22 # start application
e5ba33051de7 add scripts and compose file for importing from server
Dave smith <smith@nwoca.org>
parents:
diff changeset
23 docker-compose up -d uspsapp