changeset 241:fa943a14123d production v2.0.0

flow: Merged <release> 'v2.0.0' to <master> ('production').
author smith@nwoca.org
date Wed, 10 Jan 2018 01:45:28 +0000
parents 773ec9cc88a9 (current diff) 0e0f7fc084fb (diff)
children d5f4087419e6
files compose/preview/import-usas.yml compose/preview/import-usps.yml compose/preview/import.yml compose/preview/training.yml compose/preview/usas.template.yml compose/preview/usas.yml compose/preview/usps.template.yml compose/preview/usps.yml compose/sample/docker-compose.yml prod/import-usas.sh scripts/restore-container.sh
diffstat 19 files changed, 484 insertions(+), 191 deletions(-) [+]
line wrap: on
line diff
--- a/compose/preview/import-usas.yml	Tue Dec 26 19:43:26 2017 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-usasimport:
-  image: docker.ssdt.io/usas-import:preview
-  entrypoint: 
-    - java
-    - -Xmx1600m
-    - -XX:MaxMetaspaceSize=256m
-    - -jar
-    - /opt/import/usas-import.jar
-  command: -i ${IMP_IRN} -u ${IMP_URL} -r ${IMP_PATH}
-  links:
-    - usasdb:database
-  environment:
-    - DB_POOL_LEAKDETECTIONTHRESHOLD=0
-    - DB_HOST=database
-    - DB_NAME=$${DATABASE_ENV_DB_NAME}
-    - DB_USER=$${DATABASE_ENV_DB_USER}
-    - DB_PASS=$${DATABASE_ENV_DB_PASS}
--- a/compose/preview/import-usps.yml	Tue Dec 26 19:43:26 2017 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-uspsimport:
-  image: docker.ssdt.io/usps-import:preview
-  command: -i ${IMP_IRN} -u ${IMP_URL} -r ${IMP_PATH} ${IMP_ANON} ${IMP_EM}
-  links:
-    - uspsdb:database
-  environment:
-    - DB_POOL_LEAKDETECTIONTHRESHOLD=0
-    - DB_HOST=database
-    - DB_NAME=$${DATABASE_ENV_DB_NAME}
-    - DB_USER=$${DATABASE_ENV_DB_USER}
-    - DB_PASS=$${DATABASE_ENV_DB_PASS}
--- a/compose/preview/import.yml	Tue Dec 26 19:43:26 2017 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-uspsimport:
-  image: docker.ssdt.io/usps-import:preview
-  command: -i ${IMP_IRN} -u ${IMP_URL} -r ${IMP_PATH} ${IMP_ANON} ${IMP_EM}
-  links:
-    - uspsdb:database
-  environment:
-    - DB_HOST=database
-    - DB_NAME=$${DATABASE_ENV_DB_NAME}
-    - DB_USER=$${DATABASE_ENV_DB_USER}
-    - DB_PASS=$${DATABASE_ENV_DB_PASS}
-usasimport:
-  image: docker.ssdt.io/usas-import:preview
-  command: -i ${IMP_IRN} -u ${IMP_URL} -r ${IMP_PATH} ${IMP_ANON} ${IMP_EM}
-  links:
-    - usasdb:database
-  environment:
-    - DB_HOST=database
-    - DB_NAME=$${DATABASE_ENV_DB_NAME}
-    - DB_USER=$${DATABASE_ENV_DB_USER}
-    - DB_PASS=$${DATABASE_ENV_DB_PASS}
--- a/compose/preview/training.yml	Tue Dec 26 19:43:26 2017 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-usasdb:
-  restart: unless-stopped
-  image: docker.ssdt.io/trainingdb-usas
-  environment:
-    - DB_NAME=usasdb
-    - DB_USER=usas
-    - DB_PASS=usasdefault
-usasapp:
-  restart: unless-stopped
-  image: docker.ssdt.io/usas-app:preview
-  volumes:
-    - ${PWD}/config:/config
-  environment:
-    - DB_HOST=usas-database
-    - DB_NAME=usasdb
-    - DB_USER=usas
-    - DB_PASS=usasdefault
-    - JAVA_OPTS=-Xmx640m
-  links:
-    - usasdb:usas-database
-uspsdb:
-  restart: unless-stopped
-  image: docker.ssdt.io/trainingdb-usps
-  environment:
-    - DB_NAME=uspsdb
-    - DB_USER=usps
-    - DB_PASS=uspsdefault
-uspsapp:
-  restart: unless-stopped
-  image: docker.ssdt.io/usps-app:preview
-  volumes:
-    - ${PWD}/config:/config
-  environment:
-    - DB_HOST=usps-database
-    - DB_NAME=uspsdb
-    - DB_USER=usps
-    - DB_PASS=uspsdefault
-    - JAVA_OPTS=-Xmx640m
-  links:
-    - uspsdb:usps-database
-
--- a/compose/preview/usas.template.yml	Tue Dec 26 19:43:26 2017 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-usasdb:
-  extends:
-    file: /ssdt/compose/preview/usas.yml
-    service: usasdb
-  volumes:
-    - |volumeName|:/var/lib/postgresql/data
-usasapp:
-  extends:
-     file: /ssdt/compose/preview/usas.yml
-     service: usasapp
-  links:
-    - usasdb:database
--- a/compose/preview/usas.yml	Tue Dec 26 19:43:26 2017 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-# base compose file for USAS preview release
-usasdb:
-  restart: unless-stopped
-  image: docker.ssdt.io/ssdt-postgres:3
-  volumes:
-    - ${PWD}/backup:/backup
-  environment:
-    - DB_NAME=usasdb
-    - DB_USER=usas
-    - DB_PASS=usasdefault
-usasapp:
-  restart: unless-stopped
-  image: docker.ssdt.io/usas-app:preview
-  volumes:
-    - ${PWD}/config:/config
-  environment:
-    - DB_HOST=database
-    - DB_NAME=usasdb
-    - DB_USER=usas
-    - DB_PASS=usasdefault
--- a/compose/preview/usps.template.yml	Tue Dec 26 19:43:26 2017 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-uspsdb:
-  extends:
-    file: /ssdt/compose/preview/usps.yml
-    service: uspsdb
-  volumes:
-    - |volumeName|:/var/lib/postgresql/data
-uspsapp:
-  extends:
-     file: /ssdt/compose/preview/usps.yml
-     service: uspsapp
-  links:
-    - uspsdb:database
--- a/compose/preview/usps.yml	Tue Dec 26 19:43:26 2017 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-# base compose file for usps preview release
-uspsdb:
-  restart: unless-stopped
-  image: docker.ssdt.io/ssdt-postgres:3
-  volumes:
-    - ${PWD}/backup:/backup
-  environment:
-    - DB_NAME=uspsdb
-    - DB_USER=usps
-    - DB_PASS=uspsdefault
-uspsapp:
-  restart: unless-stopped
-  image: docker.ssdt.io/usps-app:preview
-  volumes:
-    - ${PWD}/config:/config
-  environment:
-    - DB_HOST=database
-    - DB_NAME=uspsdb
-    - DB_USER=usps
-    - DB_PASS=uspsdefault
--- a/compose/sample/docker-compose.yml	Tue Dec 26 19:43:26 2017 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-data:
-  image: busybox
-  volumes:
-    - ${PWD}/dbdata:/var/lib/postgresql/data
-    - ${PWD}/config:/config
-    - ${PWD}/backup:/backup
-db:
-  restart: always
-  image: djsmith/ssdt-postgres:1
-  volumes_from:
-    - data
-  environment:
-    - DB_NAME=usasdb
-    - DB_USER=usas
-    - DB_PASS=PleaseDontUseExamplePasswords
-app:
-  restart: always
-  image: djsmith/usas-app:snapshot
-  volumes_from:
-    - data
-  ports:
-    - "18004:8080"
-  links:
-    - db:database
-  environment:
-    - DB_HOST=database
-    - DB_NAME=$${DATABASE_ENV_DB_NAME}
-    - DB_USER=$${DATABASE_ENV_DB_USER}
-    - DB_PASS=$${DATABASE_ENV_DB_PASS}
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/prod/import-usas.sh	Wed Jan 10 01:45:28 2018 +0000
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+source "$( dirname "${BASH_SOURCE[0]}")/../scripts/.functions.sh"
+
+docker-compose stop usasapp usasdb
+resetDbVolume usasdb
+docker-compose rm -vf usasapp usasdb
+
+export IMP_IRN=${IMP_IRN}
+export IMP_URL=${IMP_URL-ftp://username:password@nwoca.org}
+export IMP_PATH=${IMP_PATH}
+
+[ -f "docker-compose.override.yml" ] && export OVERRIDE=" -f docker-compose.override.yml"
+ [ -f "docker-compose.usasimport.override.yml" ] && export OVERRIDE2=" -f docker-compose.usasimport.override.yml"
+#
+docker-compose -f docker-compose.yml -f ${SSDT_HOME}/prod/import-usas.yml $OVERRIDE rm -f usasimport 
+# start import and wait for completion
+ docker-compose -f docker-compose.yml -f ${SSDT_HOME}/prod/import-usas.yml $OVERRIDE $OVERRIDE2 up usasimport | tee usasimport.log
+# remove temporary container
+docker-compose -f docker-compose.yml -f ${SSDT_HOME}/prod/import-usas.yml $OVERRIDE rm -f usasimport
+# start application
+docker-compose up -d usasapp
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/prod/import-usas.yml	Wed Jan 10 01:45:28 2018 +0000
@@ -0,0 +1,12 @@
+version: "3.3"
+services:
+  usasimport:
+    image: docker.ssdt.io/usas-import:${USAS_TAG:-prod}
+    command: -i ${IMP_IRN- } -u ${IMP_URL- } -r ${IMP_PATH- }
+    depends_on:
+      - usasdb
+    environment:
+      - DB_HOST=usasdb
+      - DB_NAME=usasdb
+      - DB_USER=usas
+      - DB_PASS=${USAS_DB_PASSWORD:-usasdefault}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/prod/import-usps.sh	Wed Jan 10 01:45:28 2018 +0000
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+source "$( dirname "${BASH_SOURCE[0]}")/../scripts/.functions.sh"
+
+docker-compose stop uspsapp uspsdb
+resetDbVolume uspsdb
+docker-compose rm -vf uspsapp uspsdb
+
+export IMP_IRN=${IMP_IRN}
+export IMP_URL=${IMP_URL-ftp://username:password@nwoca.org}
+export IMP_PATH=${IMP_PATH}
+export IMP_ANON=${IMP_ANON:--a false}
+export IMP_EM=${IMP_EM-}
+
+[ -f "docker-compose.override.yml" ] && export OVERRIDE=" -f docker-compose.override.yml"
+[ -f "docker-compose.uspsimport.override.yml" ] && export OVERRIDE2=" -f docker-compose.uspsimport.override.yml"
+
+docker-compose -f docker-compose.yml -f ${SSDT_HOME}/prod/import-usps.yml $OVERRIDE rm -f uspsimport
+# start import and wait for completion
+docker-compose -f docker-compose.yml -f ${SSDT_HOME}/prod/import-usps.yml $OVERRIDE $OVERRIDE2 up uspsimport | tee uspsimport.log
+# remove temporary container
+docker-compose -f docker-compose.yml -f ${SSDT_HOME}/prod/import-usps.yml $OVERRIDE rm -f uspsimport
+# start application
+docker-compose up -d uspsapp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/prod/import-usps.yml	Wed Jan 10 01:45:28 2018 +0000
@@ -0,0 +1,13 @@
+version: "3.3"
+services:
+  uspsimport:
+    image: docker.ssdt.io/usps-import:${USPS_TAG:-prod}
+    command: -i ${IMP_IRN- } -u ${IMP_URL- } -r ${IMP_PATH- } ${IMP_ANON- } ${IMP_EM- }
+    depends_on:
+      - uspsdb
+    environment:
+      - DB_HOST=uspsdb
+      - DB_NAME=uspsdb
+      - DB_USER=usps
+      - DB_PASS=${USPS_DB_PASSWORD:-uspsdefault}
+ 
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/prod/setup.sh	Wed Jan 10 01:45:28 2018 +0000
@@ -0,0 +1,143 @@
+#!/bin/bash
+# Sets up a new district project based on SSDT default configuration in the current working directory.
+#
+# Usage:
+#
+#  /data/preview/sampletown $   /ssdt/compose2/preview/setup.sh [usas,usps...] 
+#
+# Will create a docker-compose.yml and .env file with default settings.
+#
+# 
+source "$(dirname "${BASH_SOURCE[0]}")/../scripts/.functions.sh"
+
+md5calc() {
+   md5sum ${1} ;
+}
+
+md5verify() {
+   md5sum -c --status ${1} ;
+}
+
+genDBHash() {
+ echo $(date +%s%N | sha256sum | base64 | head -c 32 ; echo)
+}
+
+base=$(dirname "${BASH_SOURCE[0]}")
+default_name=$(basename $PWD)
+
+args="$1$2"
+
+usas=""
+usps=""
+
+if [ "$args" == "" ] || [ -z "${args##*usas*}" ]
+then
+   usas=1
+fi
+
+if [ "$args" == "" ] || [ -z "${args##*usps*}" ]
+then
+   usps=1
+fi
+
+echo "Preparing '$(basename $PWD)' with default USxS configuration" 
+
+touch .env
+source .env
+
+if [ "$COMPOSE_PROJECT_NAME" == "" ]
+then
+   read -e -p "Enter project name: <${default_name}> " answer
+   project_name=${answer:-$default_name}
+   echo "COMPOSE_PROJECT_NAME=${project_name}" >> .env
+   echo "set project name in .env file"
+   source .env
+fi
+
+if [ ! -e "docker-compose.yml" ] 
+then 
+   create="OK"
+elif [ -e ".docker-compose.md5" ]; then
+   md5verify ./.docker-compose.md5 && create="OK"
+fi
+
+if [ "$create" == "OK" ] 
+then
+    echo "# **** DO NOT MODIFY THIS FILE. ****" > ./docker-compose.yml
+    echo "# Place customizations in docker-compose.override.yml and .env" >> ./docker-compose.yml
+    echo "version: \"3.3\""     >> ./docker-compose.yml
+    echo "services:"            >> ./docker-compose.yml
+
+    [ ! "$usas" == "" ] &&  cat $base/usas-services.yml >> ./docker-compose.yml
+    echo "" >> ./docker-compose.yml
+
+    [ ! "$usps" == "" ] &&  cat $base/usps-services.yml >> ./docker-compose.yml
+    echo "" >> ./docker-compose.yml
+
+    echo "volumes:" >> ./docker-compose.yml
+
+    if [ ! "$usas" == "" ]
+    then    
+        echo "  usasdata:" >> ./docker-compose.yml
+        [ "$USAS_DB_PASSWORD" == "" ] && echo "USAS_DB_PASSWORD=$(genDBHash)" >> ./.env
+    fi
+    
+    if [ ! "$usps" == "" ]
+    then
+      echo "  uspsdata:" >> ./docker-compose.yml
+      [ "$USPS_DB_PASSWORD" == "" ] &&  echo "USPS_DB_PASSWORD=$(genDBHash)" >> ./.env
+    fi
+    
+    echo "" >> ./docker-compose.yml
+
+    md5calc ./docker-compose.yml > .docker-compose.md5
+
+    echo "created docker-compose.yml"
+  
+else
+    echo "
+    
+    Error! docker-compose.yml file has been modified or checksum missing.  Can not auto-apply update(s).
+           Move customizations to docker-compose.override.yml then delete the docker-compose.yml
+"
+fi
+    
+if [ ! -e "docker-compose.override.yml" ] 
+then 
+   echo 'version: "3.3"' >> docker-compose.override.yml   
+fi
+    
+if [ "$USAS_APPLICATIONID" == "" ]
+then
+   read -e -p "Generate USAS and USPS integration config? <Y/n> " answer
+   case $answer in
+        y | Y | yes | YES ) answer="y";;
+        n | N | no | NO ) answer="n";;
+        *) answer="y"
+   esac
+   if [ "$answer" == "y" ] 
+   then
+     usas_id=${COMPOSE_PROJECT_NAME}-usas
+     usas_key=$(openssl rand -hex 32)
+     usps_id=${COMPOSE_PROJECT_NAME}-usps
+     usps_key=$(openssl rand -hex 32)
+     echo "USAS_APPLICATIONID=${usas_id}"   >> .env
+     echo "USAS_APIKEY=$usas_key"           >> .env
+     echo "USPS_APPLICATIONID=${usps_id}"   >> .env
+     echo "USPS_APIKEY=$usps_key"           >> .env
+     echo "Created integration API keys.  Enable integration modules after applications start"
+   fi
+fi
+
+if [ "$USAS_APP_HOST" == "" ]
+then
+   echo "USAS_APP_HOST=usasapp-svr"   >> .env
+fi
+
+if [ "$USPS_APP_HOST" == "" ]
+then
+   echo "USPS_APP_HOST=uspsapp-svr"   >> .env
+fi
+
+echo "Review or create a docker-compose.override.yml for custom settings."
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/prod/training.sh	Wed Jan 10 01:45:28 2018 +0000
@@ -0,0 +1,117 @@
+#!/bin/bash
+# Sets up a new Training project based on SSDT default configuration in the current working directory.
+#
+# Usage:
+#
+#  /data/preview/training-01 $   /ssdt/compose2/prod/training.sh
+#
+# Will create a docker-compose.yml and .env file with default settings using the SSDT 
+# supplied training database
+#
+# These are special database images which recreates the database each time the container is started.
+# Therefore, it is very easy to reset the training database simply deleting and restarting the containers. 
+# For example:
+#     
+#    docker-compose down
+#    docker-compose up -d
+#
+source "$(dirname "${BASH_SOURCE[0]}")/../scripts/.functions.sh"
+
+md5calc() {
+   md5sum ${1} ;
+}
+
+md5verify() {
+   md5sum -c --status ${1} ;
+}
+
+genDBHash() {
+ echo $(date +%s%N | sha256sum | base64 | head -c 32 ; echo)
+}
+
+base=$(dirname "${BASH_SOURCE[0]}")
+default_name=$(basename $PWD)
+
+args="$1$2"
+
+usas=""
+usps=""
+
+if [ "$args" == "" ] || [ -z "${args##*usas*}" ]
+then
+   usas=1
+fi
+
+if [ "$args" == "" ] || [ -z "${args##*usps*}" ]
+then
+   usps=1
+fi
+
+echo "Preparing training project '$(basename $PWD)' with default USxS configuration" 
+
+touch .env
+source .env
+
+project_name=${default_name}
+
+if [ "$COMPOSE_PROJECT_NAME" == "" ]
+then
+   echo "COMPOSE_PROJECT_NAME=${project_name}" >> .env
+   source .env
+fi
+
+if [ ! -e "docker-compose.yml" ] 
+then 
+   create="OK"
+elif [ -e ".docker-compose.md5" ]; then
+   md5verify ./.docker-compose.md5 && create="OK"
+fi
+
+if [ "$create" == "OK" ] 
+then
+
+    cat $base/training.yml > ./docker-compose.yml
+    echo "" >> ./docker-compose.yml
+
+    md5calc ./docker-compose.yml > .docker-compose.md5
+
+    echo "created docker-compose.yml for training instance ${project_name}"
+  
+else
+    echo "
+    
+    Error! docker-compose.yml file has been modified or checksum missing.  Can not auto-apply update(s).
+           Move customizations to docker-compose.override.yml then delete the docker-compose.yml
+"
+fi
+    
+if [ ! -e "docker-compose.override.yml" ] 
+then 
+   echo 'version: "3.3"' >> docker-compose.override.yml   
+fi
+    
+if [ "$USAS_APPLICATIONID" == "" ]
+then
+     usas_id=${COMPOSE_PROJECT_NAME}-usas
+     usas_key=$(openssl rand -hex 32)
+     usps_id=${COMPOSE_PROJECT_NAME}-usps
+     usps_key=$(openssl rand -hex 32)
+     echo "USAS_APPLICATIONID=${usas_id}"   >> .env
+     echo "USAS_APIKEY=$usas_key"           >> .env
+     echo "USPS_APPLICATIONID=${usps_id}"   >> .env
+     echo "USPS_APIKEY=$usps_key"           >> .env
+     echo "Created integration API keys.  Enable integration modules after applications start"
+fi
+
+if [ "$USAS_APP_HOST" == "" ]
+then
+   echo "USAS_APP_HOST=usasapp-svr"   >> .env
+fi
+
+if [ "$USPS_APP_HOST" == "" ]
+then
+   echo "USPS_APP_HOST=uspsapp-svr"   >> .env
+fi
+
+echo "Review or create docker-compose.override.yml for custom settings."
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/prod/training.yml	Wed Jan 10 01:45:28 2018 +0000
@@ -0,0 +1,77 @@
+# ****************************************************************
+# *                DO NOT MODIFY THIS FILE.                      *
+# *                                                              *
+# * Place customizations in docker-compose.override.yml and .env *
+# ****************************************************************
+version: "3.3"
+services:
+  usasdb:
+    restart: unless-stopped
+    image: docker.ssdt.io/trainingdb-usas:${USAS_DB_TAG:-prod}
+    networks:
+      - default
+    environment:
+      - DB_NAME=usasdb
+      - DB_USER=usas
+      - DB_PASS=${USAS_DB_PASSWORD:-usasdefault}
+  usasapp:
+    restart: unless-stopped
+    image: docker.ssdt.io/usas-app:${USAS_TAG:-prod}
+    depends_on:
+      - usasdb
+    networks:
+      default:
+        aliases:
+        - ${USAS_APP_HOST:-usasapp-svr}
+    environment:
+      - APPLICATION_ADMIN_PASSWORD=training
+      - APPLICATION_ADMIN_RESET=true
+      - DB_HOST=usasdb
+      - DB_NAME=usasdb
+      - DB_USER=usas
+      - DB_PASS=${USAS_DB_PASSWORD:-usasdefault}
+      - DB_POOL_LEAKDETECTIONTHRESHOLD=300000
+      - USAS_MODULE_USPSINTEGRATION_CONFIGURATION_USPSCONFIGURATION_CLIENTHOST=${USPS_APP_HOST:-uspsapp-svr}
+      - USAS_MODULE_USPSINTEGRATION_CONFIGURATION_USPSCONFIGURATION_CLIENTDNSLOOKUP=true
+      - USAS_MODULE_USPSINTEGRATION_CONFIGURATION_USPSCONFIGURATION_SERVERHOST=0.0.0.0
+      - USAS_MODULE_USPSINTEGRATION_CONFIGURATION_USPSCONFIGURATION_SERVERHOSTDNSLOOKUP=false
+      - USAS_MODULE_USPSINTEGRATION_CONFIGURATION_USPSCONFIGURATION_APPLICATIONID=${USAS_APPLICATIONID:- }
+      - USAS_MODULE_USPSINTEGRATION_CONFIGURATION_USPSCONFIGURATION_APIKEY=${USAS_APIKEY:- }
+      - USAS_MODULE_USPSINTEGRATION_CONFIGURATION_USPSCONFIGURATION_REMOTEAPPLICATIONID=${USPS_APPLICATIONID:- }
+      - USAS_MODULE_USPSINTEGRATION_CONFIGURATION_USPSCONFIGURATION_REMOTEAPIKEY=${USPS_APIKEY:- }
+      - JAVA_OPTS=-Xmx840m 
+  uspsdb:
+    restart: unless-stopped
+    image: docker.ssdt.io/trainingdb-usps:${USPS_DB_TAG:-prod}
+    networks:
+      - default
+    environment:
+      - DB_NAME=uspsdb
+      - DB_USER=usps
+      - DB_PASS=${USPS_DB_PASSWORD:-uspsdefault}
+  uspsapp:
+    restart: unless-stopped
+    image: docker.ssdt.io/usps-app:${USPS_TAG:-prod}
+    depends_on:
+      - uspsdb
+    networks:
+      default:
+        aliases:
+        - ${USPS_APP_HOST:-uspsapp-svr}
+    environment:
+      - APPLICATION_ADMIN_PASSWORD=training
+      - APPLICATION_ADMIN_RESET=true
+      - DB_HOST=uspsdb
+      - DB_NAME=uspsdb
+      - DB_USER=usps
+      - DB_PASS=${USPS_DB_PASSWORD:-uspsdefault}
+      - DB_POOL_LEAKDETECTIONTHRESHOLD=300000
+      - USPS_MODULE_USASINTEGRATION_CONFIGURATION_USASCONFIGURATION_CLIENTHOST=${USAS_APP_HOST:-usasapp-svr}
+      - USPS_MODULE_USASINTEGRATION_CONFIGURATION_USASCONFIGURATION_CLIENTDNSLOOKUP=true
+      - USPS_MODULE_USASINTEGRATION_CONFIGURATION_USASCONFIGURATION_SERVERHOST=0.0.0.0
+      - USPS_MODULE_USASINTEGRATION_CONFIGURATION_USASCONFIGURATION_SERVERHOSTDNSLOOKUP=false
+      - USPS_MODULE_USASINTEGRATION_CONFIGURATION_USASCONFIGURATION_APPLICATIONID=${USPS_APPLICATIONID:- }
+      - USPS_MODULE_USASINTEGRATION_CONFIGURATION_USASCONFIGURATION_APIKEY=${USPS_APIKEY:- }
+      - USPS_MODULE_USASINTEGRATION_CONFIGURATION_USASCONFIGURATION_REMOTEAPPLICATIONID=${USAS_APPLICATIONID:- }
+      - USPS_MODULE_USASINTEGRATION_CONFIGURATION_USASCONFIGURATION_REMOTEAPIKEY=${USAS_APIKEY:- }
+      - JAVA_OPTS=-Xmx840m 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/prod/usas-services.yml	Wed Jan 10 01:45:28 2018 +0000
@@ -0,0 +1,34 @@
+  usasdb:
+    restart: unless-stopped
+    image: docker.ssdt.io/ssdt-postgres:5
+    volumes:
+      - usasdata:/var/lib/postgresql/data
+    networks:
+      - default
+    environment:
+      - DB_NAME=usasdb
+      - DB_USER=usas
+      - DB_PASS=${USAS_DB_PASSWORD:-usasdefault}
+  usasapp:
+    restart: unless-stopped
+    image: docker.ssdt.io/usas-app:${USAS_TAG:-prod}
+    depends_on:
+      - usasdb
+    networks:
+      default:
+        aliases:
+        - ${USAS_APP_HOST:-usasapp-svr}
+    environment:
+      - DB_HOST=usasdb
+      - DB_NAME=usasdb
+      - DB_USER=usas
+      - DB_PASS=${USAS_DB_PASSWORD:-usasdefault}
+      - DB_POOL_LEAKDETECTIONTHRESHOLD=300000
+      - USAS_MODULE_USPSINTEGRATION_CONFIGURATION_USPSCONFIGURATION_CLIENTHOST=${USPS_APP_HOST:-uspsapp-svr}
+      - USAS_MODULE_USPSINTEGRATION_CONFIGURATION_USPSCONFIGURATION_CLIENTDNSLOOKUP=true
+      - USAS_MODULE_USPSINTEGRATION_CONFIGURATION_USPSCONFIGURATION_SERVERHOST=0.0.0.0
+      - USAS_MODULE_USPSINTEGRATION_CONFIGURATION_USPSCONFIGURATION_SERVERHOSTDNSLOOKUP=false
+      - USAS_MODULE_USPSINTEGRATION_CONFIGURATION_USPSCONFIGURATION_APPLICATIONID=${USAS_APPLICATIONID:- }
+      - USAS_MODULE_USPSINTEGRATION_CONFIGURATION_USPSCONFIGURATION_APIKEY=${USAS_APIKEY:- }
+      - USAS_MODULE_USPSINTEGRATION_CONFIGURATION_USPSCONFIGURATION_REMOTEAPPLICATIONID=${USPS_APPLICATIONID:- }
+      - USAS_MODULE_USPSINTEGRATION_CONFIGURATION_USPSCONFIGURATION_REMOTEAPIKEY=${USPS_APIKEY:- }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/prod/usps-services.yml	Wed Jan 10 01:45:28 2018 +0000
@@ -0,0 +1,34 @@
+  uspsdb:
+    restart: unless-stopped
+    image: docker.ssdt.io/ssdt-postgres:5
+    volumes:
+      - uspsdata:/var/lib/postgresql/data
+    networks:
+      - default
+    environment:
+      - DB_NAME=uspsdb
+      - DB_USER=usps
+      - DB_PASS=${USPS_DB_PASSWORD:-uspsdefault}
+  uspsapp:
+    restart: unless-stopped
+    image: docker.ssdt.io/usps-app:${USPS_TAG:-prod}
+    depends_on:
+      - uspsdb
+    networks:
+      default:
+        aliases:
+        - ${USPS_APP_HOST:-uspsapp-svr}
+    environment:
+      - DB_HOST=uspsdb
+      - DB_NAME=uspsdb
+      - DB_USER=usps
+      - DB_PASS=${USPS_DB_PASSWORD:-uspsdefault}
+      - DB_POOL_LEAKDETECTIONTHRESHOLD=300000
+      - USPS_MODULE_USASINTEGRATION_CONFIGURATION_USASCONFIGURATION_CLIENTHOST=${USAS_APP_HOST:-usasapp-svr}
+      - USPS_MODULE_USASINTEGRATION_CONFIGURATION_USASCONFIGURATION_CLIENTDNSLOOKUP=true
+      - USPS_MODULE_USASINTEGRATION_CONFIGURATION_USASCONFIGURATION_SERVERHOST=0.0.0.0
+      - USPS_MODULE_USASINTEGRATION_CONFIGURATION_USASCONFIGURATION_SERVERHOSTDNSLOOKUP=false
+      - USPS_MODULE_USASINTEGRATION_CONFIGURATION_USASCONFIGURATION_APPLICATIONID=${USPS_APPLICATIONID:- }
+      - USPS_MODULE_USASINTEGRATION_CONFIGURATION_USASCONFIGURATION_APIKEY=${USPS_APIKEY:- }
+      - USPS_MODULE_USASINTEGRATION_CONFIGURATION_USASCONFIGURATION_REMOTEAPPLICATIONID=${USAS_APPLICATIONID:- }
+      - USPS_MODULE_USASINTEGRATION_CONFIGURATION_USASCONFIGURATION_REMOTEAPIKEY=${USAS_APIKEY:- }
--- a/scripts/exec-all-projects.sh	Tue Dec 26 19:43:26 2017 +0000
+++ b/scripts/exec-all-projects.sh	Wed Jan 10 01:45:28 2018 +0000
@@ -10,20 +10,19 @@
 #
 # examples:
 #
-#   /ssdt/scripts/exec-all-projects.sh /data/pilot docker-compose ps
+#   /ssdt/scripts/exec-all-projects.sh /data/prod docker-compose ps
 # 
-#     executes "docker-compose ps" against all projects under /data/pilot
+#     executes "docker-compose ps" against all projects under /data/prod
 #
-#   /ssdt/scripts/exec-all-projects.sh /data/pilot /ssdt/ /ssdt/scripts/backup-usas.sh
+#   /ssdt/scripts/exec-all-projects.sh /data/prod /ssdt/ /ssdt/scripts/backup-usas.sh
 #
-#     runs backup-usas.sh script against all projects under /data/pilot
-#
-#   /ssdt/scripts/exec-all-projects.sh /data/pilot "/ssdt/scripts/capture.sh | /ssdt/scripts/send.sh -"
+#     runs backup-usas.sh script against all projects under /data/prod
 #
-#       captures the log files from all containers and sends one long file per project 
+#   /ssdt/scripts/exec-all-projects.sh /data/prod "/ssdt/scripts/capture.sh | /ssdt/scripts/send.sh -"
+#
+#       captures the log files from all containers and sends one log file per project 
 #       to the SSDT support server.
 #
-#
 ##
 
 source "${SSDT_SCRIPTS:-$(dirname "${BASH_SOURCE[0]}")}/.functions.sh"