comparison prod/import-inventory.sh @ 367:50e99c5b33af production vv2.9.0

flow: Merged <release> 'v2.9.0' to <master> ('production').
author Jodi Becher <becher@ssdt-ohio.org>
date Mon, 16 Aug 2021 18:46:57 +0100
parents cf7166c5c52f
children
comparison
equal deleted inserted replaced
359:dab812f30d3e 367:50e99c5b33af
1 #!/bin/bash
2 #
3 BASEDIR="$PWD"
4 # read required environment variables
5 source $BASEDIR/.env/ssdt-inventory-shared.properties
6 source $BASEDIR/.env/ssdt-inventory-import.properties
7 #
8 # docker login
9 echo "Attempting to login to $artifactUrl"
10 docker login $artifactUrl -u $artifactUser -p $artifactPassword
11 # docker pull
12 echo "Attempting to pull $artifactUrl/inventory-importapp:$importVersion"
13 docker pull $artifactUrl/inventory-importapp:$importVersion
14 #
15 echo "Building docker run command"
16 dockerParams="--rm --name $entityId-inventory-importapp -v $importPath:/extracts --network $entityId-inventory-net"
17 dockerParams="$dockerParams -e SPRING_DATASOURCE_URL=jdbc:postgresql://$entityId-inventory-db:5432/invdb -e SPRING_DATASOURCE_PASSWORD=$dbPassword"
18 dockerParams="$dockerParams -e SPRING_PROFILES_ACTIVE=prod -e APPLICATION_ADMIN_PASSWORD=$adminPassword -i $artifactUrl/inventory-importapp:$importVersion"
19 echo "Executing docker run command"
20 docker run $dockerParams