Mercurial > public > ssdt-docker
changeset 386:3c0d82dcd168 production vv2.12.0
flow: Merged <release> 'v2.12.0' to <master> ('production').
author | Marc Davis <davis@ssdt-ohio.org> |
---|---|
date | Tue, 14 Sep 2021 09:43:21 -0400 |
parents | b1872764b61b (current diff) d6b715ded289 (diff) |
children | d6f2270566e9 |
files | |
diffstat | 3 files changed, 169 insertions(+), 169 deletions(-) [+] |
line wrap: on
line diff
--- a/prod/install-workflows-app.sh Fri Sep 10 07:48:01 2021 -0400 +++ b/prod/install-workflows-app.sh Tue Sep 14 09:43:21 2021 -0400 @@ -1,68 +1,68 @@ -#!/bin/bash -# -# read required env variables -BASEDIR="$PWD" -source $BASEDIR/.env/ssdt-workflows-shared.properties -source $BASEDIR/.env/ssdt-workflows-app.properties -# docker login -echo "Attempting to login to $artifactUrl" -docker login $artifactUrl -u $artifactUser -p $artifactPassword -# docker pull db image -echo "Attempting to pull $artifactUrl/ssdt-workflows-app:$appVersion" -docker pull $artifactUrl/ssdt-workflows-app:$appVersion -# -# Builder docker run command based on settings in env files -echo "Building docker run command" -dockerRunCommand="docker run --name $entityId-workflows-app - --restart=unless-stopped - --network $entityId-workflows-net - -e SPRING_DATASOURCE_URL=jdbc:postgresql://$entityId-workflows-db:5432/workflowsdb - -e SPRING_DATASOURCE_DRIVER_CLASS_NAME=org.postgresql.Driver - -e SPRING_DATASOURCE_USERNAME=postgres - -e SPRING_DATASOURCE_PASSWORD=$dbPassword - -e SPRING_PROFILES_ACTIVE=prod - -e CAMUNDA_BPM_ADMINUSER_ID=admin - -e CAMUNDA_BPM_ADMINUSER_PASSWORD=$adminPassword - -e USAS_CONFIGURATION_HOST=$usasHost - -e USAS_CONFIGURATION_PORT=$usasPort - -e USAS_CONFIGURATION_APIKEY=$usasApiKey - -e USAS_CONFIGURATION_REMOTEAPIKEY=$usasRemoteApiKey - -e USPS_CONFIGURATION_HOST=$uspsHost - -e USPS_CONFIGURATION_PORT=$uspsPort - -e USPS_CONFIGURATION_APIKEY=$uspsApiKey - -e USPS_CONFIGURATION_REMOTEAPIKEY=$uspsRemoteApiKey - -e JAVA_OPTS=$java_opts" -# -if [ ! -z "$usasContext" ]; then - dockerRunCommand="$dockerRunCommand -e USAS_CONFIGURATION_CONTEXT=$usasContext" -fi -# -if [ ! -z "$uspsContext" ]; then - dockerRunCommand="$dockerRunCommand -e USPS_CONFIGURATION_CONTEXT=$uspsContext" -fi -# -if [ ! -z "$virtualHost" ]; then - dockerRunCommand="$dockerRunCommand -e VIRTUAL_HOST=$virtualHost" -fi -# -if [ ! -z "$virtualPort" ]; then - dockerRunCommand="$dockerRunCommand -e VIRTUAL_PORT=$virtualPort" -fi -# -if [ ! -z "$letsencryptHost" ]; then - dockerRunCommand="$dockerRunCommand -e LETSENCRYPT_HOST=$letsencryptHost" -fi -# -if [ ! -z "$letsencryptEmail" ]; then - dockerRunCommand="$dockerRunCommand -e LETSENCRYPT_EMAIL=$letsencryptEmail" -fi -# -if [ ! -z "$hostPort" ]; then - dockerRunCommand="$dockerRunCommand -p $hostPort" -fi -# -dockerRunCommand="$dockerRunCommand -d $artifactUrl/ssdt-workflows-app:$appVersion" -# -# Execute constructed docker run command to create $entityId-workflows-app container connected to db and docker network -echo "Executing docker run command" +#!/bin/bash +# +# read required env variables +BASEDIR="$PWD" +source $BASEDIR/.env/ssdt-workflows-shared.properties +source $BASEDIR/.env/ssdt-workflows-app.properties +# docker login +echo "Attempting to login to $artifactUrl" +docker login $artifactUrl -u $artifactUser -p $artifactPassword +# docker pull db image +echo "Attempting to pull $artifactUrl/ssdt-workflows-app:$appVersion" +docker pull $artifactUrl/ssdt-workflows-app:$appVersion +# +# Builder docker run command based on settings in env files +echo "Building docker run command" +dockerRunCommand="docker run --name $entityId-workflows-app + --restart=unless-stopped + --network $entityId-workflows-net + -e SPRING_DATASOURCE_URL=jdbc:postgresql://$entityId-workflows-db:5432/workflowsdb + -e SPRING_DATASOURCE_DRIVER_CLASS_NAME=org.postgresql.Driver + -e SPRING_DATASOURCE_USERNAME=postgres + -e SPRING_DATASOURCE_PASSWORD=$dbPassword + -e SPRING_PROFILES_ACTIVE=prod + -e CAMUNDA_BPM_ADMINUSER_ID=admin + -e CAMUNDA_BPM_ADMINUSER_PASSWORD=$adminPassword + -e USAS_CONFIGURATION_HOST=$usasHost + -e USAS_CONFIGURATION_PORT=$usasPort + -e USAS_CONFIGURATION_APIKEY=$usasApiKey + -e USAS_CONFIGURATION_REMOTEAPIKEY=$usasRemoteApiKey + -e USPS_CONFIGURATION_HOST=$uspsHost + -e USPS_CONFIGURATION_PORT=$uspsPort + -e USPS_CONFIGURATION_APIKEY=$uspsApiKey + -e USPS_CONFIGURATION_REMOTEAPIKEY=$uspsRemoteApiKey + -e JAVA_OPTS=$java_opts" +# +if [ ! -z "$usasContext" ]; then + dockerRunCommand="$dockerRunCommand -e USAS_CONFIGURATION_CONTEXT=$usasContext" +fi +# +if [ ! -z "$uspsContext" ]; then + dockerRunCommand="$dockerRunCommand -e USPS_CONFIGURATION_CONTEXT=$uspsContext" +fi +# +if [ ! -z "$virtualHost" ]; then + dockerRunCommand="$dockerRunCommand -e VIRTUAL_HOST=$virtualHost" +fi +# +if [ ! -z "$virtualPort" ]; then + dockerRunCommand="$dockerRunCommand -e VIRTUAL_PORT=$virtualPort" +fi +# +if [ ! -z "$letsencryptHost" ]; then + dockerRunCommand="$dockerRunCommand -e LETSENCRYPT_HOST=$letsencryptHost" +fi +# +if [ ! -z "$letsencryptEmail" ]; then + dockerRunCommand="$dockerRunCommand -e LETSENCRYPT_EMAIL=$letsencryptEmail" +fi +# +if [ ! -z "$hostPort" ]; then + dockerRunCommand="$dockerRunCommand -p $hostPort" +fi +# +dockerRunCommand="$dockerRunCommand -d $artifactUrl/ssdt-workflows-app:$appVersion" +# +# Execute constructed docker run command to create $entityId-workflows-app container connected to db and docker network +echo "Executing docker run command" $dockerRunCommand \ No newline at end of file
--- a/prod/install-workflows-db.sh Fri Sep 10 07:48:01 2021 -0400 +++ b/prod/install-workflows-db.sh Tue Sep 14 09:43:21 2021 -0400 @@ -1,26 +1,26 @@ -#!/bin/bash -# -# read required env variables -BASEDIR="$PWD" -source $BASEDIR/.env/ssdt-workflows-shared.properties -source $BASEDIR/.env/ssdt-workflows-db.properties -# -# docker login -echo "Attempting to login to $artifactUrl" -docker login $artifactUrl -u $artifactUser -p $artifactPassword -# docker pull db image -echo "Attempting to pull $artifactUrl/ssdt-workflows-$dbVersion" -docker pull $artifactUrl/ssdt-workflows-db:$dbVersion -# -# Create workflows specific docker network for $entityId -echo "Attempting to create $entityId-workflows-net docker network" -docker network create $entityId-workflows-net -#docker run workflows-db (data mounted as volume) connected to $entityId-workflows-net docker network -echo "Attempting to execute docker run command" -docker run --name $entityId-workflows-db \ - --restart=unless-stopped \ - --mount source=$entityId-workflows-db,target=/var/lib/postgresql/data \ - --network $entityId-workflows-net \ - -e POSTGRES_DB=workflowsdb \ - -e POSTGRES_PASSWORD=$dbPassword \ - -d $artifactUrl/ssdt-workflows-db:$dbVersion +#!/bin/bash +# +# read required env variables +BASEDIR="$PWD" +source $BASEDIR/.env/ssdt-workflows-shared.properties +source $BASEDIR/.env/ssdt-workflows-db.properties +# +# docker login +echo "Attempting to login to $artifactUrl" +docker login $artifactUrl -u $artifactUser -p $artifactPassword +# docker pull db image +echo "Attempting to pull $artifactUrl/ssdt-workflows-$dbVersion" +docker pull $artifactUrl/ssdt-workflows-db:$dbVersion +# +# Create workflows specific docker network for $entityId +echo "Attempting to create $entityId-workflows-net docker network" +docker network create $entityId-workflows-net +#docker run workflows-db (data mounted as volume) connected to $entityId-workflows-net docker network +echo "Attempting to execute docker run command" +docker run --name $entityId-workflows-db \ + --restart=unless-stopped \ + --mount source=$entityId-workflows-db,target=/var/lib/postgresql/data \ + --network $entityId-workflows-net \ + -e POSTGRES_DB=workflowsdb \ + -e POSTGRES_PASSWORD=$dbPassword \ + -d $artifactUrl/ssdt-workflows-db:$dbVersion
--- a/prod/update-workflows-app.sh Fri Sep 10 07:48:01 2021 -0400 +++ b/prod/update-workflows-app.sh Tue Sep 14 09:43:21 2021 -0400 @@ -1,77 +1,77 @@ -#!/bin/bash -# -# read required env variables -BASEDIR="$PWD" -source $BASEDIR/.env/ssdt-workflows-shared.properties -source $BASEDIR/.env/ssdt-workflows-app.properties -# -# docker login -echo "Attempting to login to $artifactUrl" -docker login $artifactUrl -u $artifactUser -p $artifactPassword -# docker pull app image -echo "Attempting to pull $artifactUrl/ssdt-workflows-app:$appVersion" -docker pull $artifactUrl/ssdt-workflows-app:$appVersion -# -# docker stop workflows app container -echo "Attempting to stop $entityId-workflows-app container" -docker stop $entityId-workflows-app -# -# docker rm workflows app container -echo "Attempting to remove $entityId-workflows-app container" -docker rm $entityId-workflows-app -# -# docker run ssdt-workflows app container based on a new image -echo "Building docker run command" -dockerRunCommand="docker run --name $entityId-workflows-app - --restart=unless-stopped - --network $entityId-workflows-net - -e SPRING_DATASOURCE_URL=jdbc:postgresql://$entityId-workflows-db:5432/workflowsdb - -e SPRING_DATASOURCE_DRIVER_CLASS_NAME=org.postgresql.Driver - -e SPRING_DATASOURCE_USERNAME=postgres - -e SPRING_DATASOURCE_PASSWORD=$dbPassword - -e SPRING_PROFILES_ACTIVE=prod - -e CAMUNDA_BPM_ADMINUSER_ID=admin - -e CAMUNDA_BPM_ADMINUSER_PASSWORD=$adminPassword - -e USAS_CONFIGURATION_HOST=$usasHost - -e USAS_CONFIGURATION_PORT=$usasPort - -e USAS_CONFIGURATION_APIKEY=$usasApiKey - -e USAS_CONFIGURATION_REMOTEAPIKEY=$usasRemoteApiKey - -e USPS_CONFIGURATION_HOST=$uspsHost - -e USPS_CONFIGURATION_PORT=$uspsPort - -e USPS_CONFIGURATION_APIKEY=$uspsApiKey - -e USPS_CONFIGURATION_REMOTEAPIKEY=$uspsRemoteApiKey - -e JAVA_OPTS=$java_opts" -# -if [ ! -z "$usasContext" ]; then - dockerRunCommand="$dockerRunCommand -e USAS_CONFIGURATION_CONTEXT=$usasContext" -fi -# -if [ ! -z "$uspsContext" ]; then - dockerRunCommand="$dockerRunCommand -e USPS_CONFIGURATION_CONTEXT=$uspsContext" -fi -# -if [ ! -z "$virtualHost" ]; then - dockerRunCommand="$dockerRunCommand -e VIRTUAL_HOST=$virtualHost" -fi -# -if [ ! -z "$virtualPort" ]; then - dockerRunCommand="$dockerRunCommand -e VIRTUAL_PORT=$virtualPort" -fi -# -if [ ! -z "$letsencryptHost" ]; then - dockerRunCommand="$dockerRunCommand -e LETSENCRYPT_HOST=$letsencryptHost" -fi -# -if [ ! -z "$letsencryptEmail" ]; then - dockerRunCommand="$dockerRunCommand -e LETSENCRYPT_EMAIL=$letsencryptEmail" -fi -# -if [ ! -z "$hostPort" ]; then - dockerRunCommand="$dockerRunCommand -p $hostPort" -fi -# -dockerRunCommand="$dockerRunCommand -d $artifactUrl/ssdt-workflows-app:$appVersion" -# -# Execute constructed docker run command to create $entityId-workflows-app container connected to db and docker network -echo "Executing docker run command" +#!/bin/bash +# +# read required env variables +BASEDIR="$PWD" +source $BASEDIR/.env/ssdt-workflows-shared.properties +source $BASEDIR/.env/ssdt-workflows-app.properties +# +# docker login +echo "Attempting to login to $artifactUrl" +docker login $artifactUrl -u $artifactUser -p $artifactPassword +# docker pull app image +echo "Attempting to pull $artifactUrl/ssdt-workflows-app:$appVersion" +docker pull $artifactUrl/ssdt-workflows-app:$appVersion +# +# docker stop workflows app container +echo "Attempting to stop $entityId-workflows-app container" +docker stop $entityId-workflows-app +# +# docker rm workflows app container +echo "Attempting to remove $entityId-workflows-app container" +docker rm $entityId-workflows-app +# +# docker run ssdt-workflows app container based on a new image +echo "Building docker run command" +dockerRunCommand="docker run --name $entityId-workflows-app + --restart=unless-stopped + --network $entityId-workflows-net + -e SPRING_DATASOURCE_URL=jdbc:postgresql://$entityId-workflows-db:5432/workflowsdb + -e SPRING_DATASOURCE_DRIVER_CLASS_NAME=org.postgresql.Driver + -e SPRING_DATASOURCE_USERNAME=postgres + -e SPRING_DATASOURCE_PASSWORD=$dbPassword + -e SPRING_PROFILES_ACTIVE=prod + -e CAMUNDA_BPM_ADMINUSER_ID=admin + -e CAMUNDA_BPM_ADMINUSER_PASSWORD=$adminPassword + -e USAS_CONFIGURATION_HOST=$usasHost + -e USAS_CONFIGURATION_PORT=$usasPort + -e USAS_CONFIGURATION_APIKEY=$usasApiKey + -e USAS_CONFIGURATION_REMOTEAPIKEY=$usasRemoteApiKey + -e USPS_CONFIGURATION_HOST=$uspsHost + -e USPS_CONFIGURATION_PORT=$uspsPort + -e USPS_CONFIGURATION_APIKEY=$uspsApiKey + -e USPS_CONFIGURATION_REMOTEAPIKEY=$uspsRemoteApiKey + -e JAVA_OPTS=$java_opts" +# +if [ ! -z "$usasContext" ]; then + dockerRunCommand="$dockerRunCommand -e USAS_CONFIGURATION_CONTEXT=$usasContext" +fi +# +if [ ! -z "$uspsContext" ]; then + dockerRunCommand="$dockerRunCommand -e USPS_CONFIGURATION_CONTEXT=$uspsContext" +fi +# +if [ ! -z "$virtualHost" ]; then + dockerRunCommand="$dockerRunCommand -e VIRTUAL_HOST=$virtualHost" +fi +# +if [ ! -z "$virtualPort" ]; then + dockerRunCommand="$dockerRunCommand -e VIRTUAL_PORT=$virtualPort" +fi +# +if [ ! -z "$letsencryptHost" ]; then + dockerRunCommand="$dockerRunCommand -e LETSENCRYPT_HOST=$letsencryptHost" +fi +# +if [ ! -z "$letsencryptEmail" ]; then + dockerRunCommand="$dockerRunCommand -e LETSENCRYPT_EMAIL=$letsencryptEmail" +fi +# +if [ ! -z "$hostPort" ]; then + dockerRunCommand="$dockerRunCommand -p $hostPort" +fi +# +dockerRunCommand="$dockerRunCommand -d $artifactUrl/ssdt-workflows-app:$appVersion" +# +# Execute constructed docker run command to create $entityId-workflows-app container connected to db and docker network +echo "Executing docker run command" $dockerRunCommand \ No newline at end of file