Mercurial > public > ssdt-docker
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/prod/import-inventory.sh Mon Aug 16 18:46:57 2021 +0100 @@ -0,0 +1,20 @@ +#!/bin/bash +# +BASEDIR="$PWD" +# read required environment variables +source $BASEDIR/.env/ssdt-inventory-shared.properties +source $BASEDIR/.env/ssdt-inventory-import.properties +# +# docker login +echo "Attempting to login to $artifactUrl" +docker login $artifactUrl -u $artifactUser -p $artifactPassword +# docker pull +echo "Attempting to pull $artifactUrl/inventory-importapp:$importVersion" +docker pull $artifactUrl/inventory-importapp:$importVersion +# +echo "Building docker run command" +dockerParams="--rm --name $entityId-inventory-importapp -v $importPath:/extracts --network $entityId-inventory-net" +dockerParams="$dockerParams -e SPRING_DATASOURCE_URL=jdbc:postgresql://$entityId-inventory-db:5432/invdb -e SPRING_DATASOURCE_PASSWORD=$dbPassword" +dockerParams="$dockerParams -e SPRING_PROFILES_ACTIVE=prod -e APPLICATION_ADMIN_PASSWORD=$adminPassword -i $artifactUrl/inventory-importapp:$importVersion" +echo "Executing docker run command" +docker run $dockerParams