Mercurial > public > ssdt-docker
changeset 106:bd1f900972ed feature/djs-DEP-12-docker
DEP-12: move V2 compose files to ../compose2 directory
author | smith@nwoca.org |
---|---|
date | Fri, 21 Apr 2017 17:16:35 +0100 |
parents | 8f45c43ea7a4 |
children | dc3696525de4 |
files | compose/rc/import.yml compose/rc/training.yml compose/rc/usas-template.yml compose/rc/usas.yml compose/rc/usps.yml compose2/preview/training.yml compose2/preview/usas-template.yml compose2/preview/usas.yml compose2/preview/usps.yml |
diffstat | 9 files changed, 93 insertions(+), 315 deletions(-) [+] |
line wrap: on
line diff
--- a/compose/rc/import.yml Wed Sep 21 19:00:41 2016 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,222 +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} -diff -r 5fae3adac2af compose/rc/usas.template.yml ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ b/compose/rc/usas.template.yml Wed Sep 21 21:04:33 2016 +0000 -@@ -0,0 +1,12 @@ -+version: "2" -+services: -+ 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 -diff -r 5fae3adac2af compose/rc/usas.yml ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ b/compose/rc/usas.yml Wed Sep 21 21:04:33 2016 +0000 -@@ -0,0 +1,25 @@ -+# base compose file for USAS Release Candidate release -+version: "2" -+services: -+ 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=usasdb -+ - DB_NAME=usasdb -+ - DB_USER=usas -+ - DB_PASS=usasdefault -+ - ORG_SSDT_OHIO_USAS_MODULE_USPSINTEGRATION_CONFIGURATION_USPSCONFIGURATION_SERVERHOST=uspsapp -+ - ORG_SSDT_OHIO_USAS_MODULE_USPSINTEGRATION_CONFIGURATION_USPSCONFIGURATION_SERVERDNSLOOKUP=true -+ -diff -r 5fae3adac2af compose/rc/usps.template.yml ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ b/compose/rc/usps.template.yml Wed Sep 21 21:04:33 2016 +0000 -@@ -0,0 +1,12 @@ -+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 -diff -r 5fae3adac2af compose/rc/usps.yml ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ b/compose/rc/usps.yml Wed Sep 21 21:04:33 2016 +0000 -@@ -0,0 +1,24 @@ -+# base compose file for usps Release Candidate release -+version: "2" -+services: -+ 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=uspsdb -+ - DB_NAME=uspsdb -+ - DB_USER=usps -+ - DB_PASS=uspsdefault -+ - ORG_SSDT_OHIO_USPS_MODULE_USASINTEGRATION_CONFIGURATION_USASCONFIGURATION_SERVERHOST=usasapp -+ - ORG_SSDT_OHIO_USPS_MODULE_USASINTEGRATION_CONFIGURATION_USASCONFIGURATION_SERVERDNSLOOKUP=true -diff -r 5fae3adac2af init.sh ---- a/init.sh Tue Aug 30 16:37:52 2016 +0100 -+++ b/init.sh Wed Sep 21 21:04:33 2016 +0000 -@@ -1,3 +1,5 @@ - #!/bin/bash --alias utils='docker run -it -v ${PWD}:/tmp -v /ssdt:/ssdt --rm docker.ssdt.io/ssdt-utils' --alias send2ssdt='/ssdt/scripts/send.sh' -\ No newline at end of file -+source "$( dirname "${BASH_SOURCE[0]}")/scripts/.functions.sh" -+alias utils='docker run -it -v ${PWD}:/tmp -v $SSDT_HOME:/ssdt --rm docker.ssdt.io/ssdt-utils' -+alias send2ssdt='/ssdt/scripts/send.sh' -+export PATH=$PATH:$SSDT_HOME/scripts -diff -r 5fae3adac2af scripts/.functions.sh ---- a/scripts/.functions.sh Tue Aug 30 16:37:52 2016 +0100 -+++ b/scripts/.functions.sh Wed Sep 21 21:04:33 2016 +0000 -@@ -1,5 +1,8 @@ - #!/bin/bash - -+export SSDT_SCRIPTS=$(dirname "${BASH_SOURCE[0]}") -+export SSDT_HOME=$(dirname $SSDT_SCRIPTS) -+ - # deletes psql data from specified service - resetDbVolume() { - # Works for named and unnamed volumes and custom $PGDATA. -@@ -26,4 +29,11 @@ - container=$(composeGetContainer $service) - - echo "$2" | docker exec -i $container sh -c "gosu postgres psql \$DB_NAME" --} -\ No newline at end of file -+} -+ -+composeGetProject() { -+ service=${1?"Must supply service from current project"} -+ container=$(composeGetContainer $service) -+ echo $(docker inspect -f '{{index .Config.Labels "com.docker.compose.project" }}' $container) -+ -+} -diff -r 5fae3adac2af scripts/capture.sh ---- a/scripts/capture.sh Tue Aug 30 16:37:52 2016 +0100 -+++ b/scripts/capture.sh Wed Sep 21 21:04:33 2016 +0000 -@@ -1,3 +1,3 @@ - #!/bin/bash - # writes tail of current logs to standard out from running containers in compose project. --docker-compose ps -q | xargs -I ID docker inspect --format='{{.LogPath}}' ID | xargs tail -n${1-8000} -+docker-compose logs --no-color $1 -diff -r 5fae3adac2af scripts/console.sh ---- a/scripts/console.sh Tue Aug 30 16:37:52 2016 +0100 -+++ b/scripts/console.sh Wed Sep 21 21:04:33 2016 +0000 -@@ -1,11 +1,22 @@ - #!/bin/bash -+# connects to the telnet console of the application for the specified service of the current project - --# connects to the telnet console of the application for the specified service of the current project - source "$( dirname "${BASH_SOURCE[0]}")/.functions.sh" - - container=$(composeGetContainer ${1?"Must specify the app service of the console to connect to"} ) - - ip=$(docker inspect -f '{{.NetworkSettings.IPAddress}}' $container) - --docker run -it -v ${PWD}:/tmp -v /ssdt:/ssdt --rm docker.ssdt.io/ssdt-utils telnet $ip 2000 | tee console.log - -+if [ "$ip" == "" ] -+then -+ ip=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $container) -+ project=$(composeGetProject ${1} ) -+fi -+ -+if [ "$project" == "" ] -+then -+ docker run -it -v ${PWD}:/tmp -v ${SSDT_HOME}:/ssdt --rm docker.ssdt.io/ssdt-utils telnet $ip 2000 | tee console.log -+else -+ docker run -it --network ${project}_default --rm docker.ssdt.io/ssdt-utils telnet $ip 2000 | tee console.log -+fi -diff -r 5fae3adac2af scripts/info.sh ---- a/scripts/info.sh Tue Aug 30 16:37:52 2016 +0100 -+++ b/scripts/info.sh Wed Sep 21 21:04:33 2016 +0000 -@@ -1,13 +1,14 @@ - #!/bin/bash -+source "$( dirname "${BASH_SOURCE[0]}")/.functions.sh" - echo $BASH_VERSION - docker version - docker-compose version - echo "------- Docker info-------------" - docker info - echo "------- Images -----------------" --/ssdt/scripts/d-images.sh -+. $SSDT_HOME/scripts/d-images.sh - echo "------- Containers------" --/ssdt/scripts/d-ps.sh -+. $SSDT_HOME/scripts/d-ps.sh - echo "------- OS Processes------------" - top -b -n 1 - -diff -r 5fae3adac2af scripts/send.sh ---- a/scripts/send.sh Tue Aug 30 16:37:52 2016 +0100 -+++ b/scripts/send.sh Wed Sep 21 21:04:33 2016 +0000 -@@ -1,10 +1,12 @@ - #!/bin/bash -+source "$( dirname "${BASH_SOURCE[0]}")/.functions.sh" - file=${1?"Usage: $0 filename [name]\n specify the filename relative to the current directory or - for stdin.\noptionally specify a short name (default to base directory)"} -+ - if [ "$file" != "-" ] - then - file="/tmp/${file}" - fi - name=${2:-$(basename $PWD)} - source=$(hostname) --docker run -i -v /ssdt:/ssdt -v ${PWD}:/tmp --rm docker.ssdt.io/ssdt-utils \ -- curl -F source=$source -F name=$name -F file=@$file https://upload.ssdt.io/upload -\ No newline at end of file -+docker run -i -v $SSDT_HOME:/ssdt -v ${PWD}:/tmp --rm docker.ssdt.io/ssdt-utils \ -+ curl -F source=$source -F name=$name -F file=@$file https://upload.ssdt.io/upload \ No newline at end of file
--- a/compose/rc/training.yml Wed Sep 21 19:00:41 2016 -0400 +++ /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/rc/usas-template.yml Wed Sep 21 19:00:41 2016 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ -version: "2" -services: - 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 \ No newline at end of file
--- a/compose/rc/usas.yml Wed Sep 21 19:00:41 2016 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ -version: "2" -services: - usasdb: - restart: unless-stopped - image: docker.ssdt.io/ssdt-postgres:3 - environment: - - DB_NAME=usasdb - - DB_USER=usas - - DB_PASS=usasdefault - usasapp: - restart: unless-stopped - image: docker.ssdt.io/usas-app:preview - environment: - - DB_HOST=usasdb - - DB_NAME=usasdb - - DB_USER=usas - - DB_PASS=usasdefault - - ORG_SSDT_OHIO_USAS_MODULE_USPSINTEGRATION_CONFIGURATION_USPSCONFIGURATION_SERVERHOST=uspsapp - - ORG_SSDT_OHIO_USAS_MODULE_USPSINTEGRATION_CONFIGURATION_USPSCONFIGURATION_SERVERDNSLOOKUP=true -
--- a/compose/rc/usps.yml Wed Sep 21 19:00:41 2016 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ -# base compose file for usps Release Candidate release -version: "2" -services: - uspsdb: - restart: unless-stopped - image: docker.ssdt.io/ssdt-postgres:3 - environment: - - DB_NAME=uspsdb - - DB_USER=usps - - DB_PASS=uspsdefault - uspsapp: - restart: unless-stopped - image: docker.ssdt.io/usps-app:preview - environment: - - DB_HOST=uspsdb - - DB_NAME=uspsdb - - DB_USER=usps - - DB_PASS=uspsdefault - - ORG_SSDT_OHIO_USPS_MODULE_USASINTEGRATION_CONFIGURATION_USASCONFIGURATION_SERVERHOST=usasapp - - ORG_SSDT_OHIO_USPS_MODULE_USASINTEGRATION_CONFIGURATION_USASCONFIGURATION_SERVERDNSLOOKUP=true
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/compose2/preview/training.yml Fri Apr 21 17:16:35 2017 +0100 @@ -0,0 +1,41 @@ +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 +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/compose2/preview/usas-template.yml Fri Apr 21 17:16:35 2017 +0100 @@ -0,0 +1,12 @@ +version: "2" +services: + 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 \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/compose2/preview/usas.yml Fri Apr 21 17:16:35 2017 +0100 @@ -0,0 +1,20 @@ +version: "2" +services: + usasdb: + restart: unless-stopped + image: docker.ssdt.io/ssdt-postgres:3 + environment: + - DB_NAME=usasdb + - DB_USER=usas + - DB_PASS=usasdefault + usasapp: + restart: unless-stopped + image: docker.ssdt.io/usas-app:preview + environment: + - DB_HOST=usasdb + - DB_NAME=usasdb + - DB_USER=usas + - DB_PASS=usasdefault + - ORG_SSDT_OHIO_USAS_MODULE_USPSINTEGRATION_CONFIGURATION_USPSCONFIGURATION_SERVERHOST=uspsapp + - ORG_SSDT_OHIO_USAS_MODULE_USPSINTEGRATION_CONFIGURATION_USPSCONFIGURATION_SERVERDNSLOOKUP=true +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/compose2/preview/usps.yml Fri Apr 21 17:16:35 2017 +0100 @@ -0,0 +1,20 @@ +# base compose file for usps Release Candidate release +version: "2" +services: + uspsdb: + restart: unless-stopped + image: docker.ssdt.io/ssdt-postgres:3 + environment: + - DB_NAME=uspsdb + - DB_USER=usps + - DB_PASS=uspsdefault + uspsapp: + restart: unless-stopped + image: docker.ssdt.io/usps-app:preview + environment: + - DB_HOST=uspsdb + - DB_NAME=uspsdb + - DB_USER=usps + - DB_PASS=uspsdefault + - ORG_SSDT_OHIO_USPS_MODULE_USASINTEGRATION_CONFIGURATION_USASCONFIGURATION_SERVERHOST=usasapp + - ORG_SSDT_OHIO_USPS_MODULE_USASINTEGRATION_CONFIGURATION_USASCONFIGURATION_SERVERDNSLOOKUP=true