comparison prod/install-workflows-db.sh @ 377:c1e8c755bce2 production

flow: Promoted <release> 'v2.11.0' (c6b2a1abecb8) to 'production'.
author Marc Davis <davis@ssdt-ohio.org>
date Fri, 10 Sep 2021 07:47:54 -0400
parents c6b2a1abecb8
children 5909f75b4f13
comparison
equal deleted inserted replaced
372:173b41c77349 377:c1e8c755bce2
1 #!/bin/bash
2 #
3 # read required env variables
4 BASEDIR="$PWD"
5 source $BASEDIR/.env/ssdt-workflows-shared.properties
6 source $BASEDIR/.env/ssdt-workflows-db.properties
7 #
8 # docker login
9 echo "Attempting to login to $artifactUrl"
10 docker login $artifactUrl -u $artifactUser -p $artifactPassword
11 # docker pull db image
12 echo "Attempting to pull $artifactUrl/ssdt-workflows-$dbVersion"
13 docker pull $artifactUrl/ssdt-workflows-db:$dbVersion
14 #
15 # Create workflows specific docker network for $entityId
16 echo "Attempting to create $entityId-workflows-net docker network"
17 docker network create $entityId-workflows-net
18 #docker run workflows-db (data mounted as volume) connected to $entityId-workflows-net docker network
19 echo "Attempting to execute docker run command"
20 docker run --name $entityId-workflows-db \
21 --restart=unless-stopped \
22 --mount source=$entityId-workflows-db,target=/var/lib/postgresql/data \
23 --network $entityId-workflows-net \
24 -e POSTGRES_DB=workflowsdb \
25 -e POSTGRES_PASSWORD=$dbPassword \
26 -d $artifactUrl/ssdt-workflows-db:$dbVersion