changeset 39:297b56dfba19

add training compose file
author smith@nwoca.org
date Wed, 20 Jan 2016 20:15:49 +0000
parents cd482d0a46e8
children ef52df9248de
files compose/preview/training.yml trainingdb-usas/Dockerfile trainingdb/Dockerfile
diffstat 3 files changed, 22 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/compose/preview/training.yml	Wed Jan 20 19:03:38 2016 +0000
+++ b/compose/preview/training.yml	Wed Jan 20 20:15:49 2016 +0000
@@ -6,11 +6,17 @@
     - DB_USER=usas
     - DB_PASS=usasdefault
 usasapp:
-  extends:
-    file: /ssdt/compose/preview/usas.yml
-    service: 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
   links:
-    - usasdb:database
+    - usasdb:usas-database
 uspsdb:
   restart: unless-stopped
   image: docker.ssdt.io/trainingdb-usps
@@ -19,9 +25,15 @@
     - DB_USER=usps
     - DB_PASS=uspsdefault
 uspsapp:
-  extends:
-    file: /ssdt/compose/preview/usps.yml
-    service: 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
   links:
-    - uspsdb:database
+    - uspsdb:usps-database
 
--- a/trainingdb-usas/Dockerfile	Wed Jan 20 19:03:38 2016 +0000
+++ b/trainingdb-usas/Dockerfile	Wed Jan 20 20:15:49 2016 +0000
@@ -5,7 +5,7 @@
 
 RUN chmod a+r $BACKUP_FILE
 
-env DB_NAME=usasdb \
+ENV DB_NAME=usasdb \
     DB_USER=usas \
     DB_PASS=usasdefault
 
--- a/trainingdb/Dockerfile	Wed Jan 20 19:03:38 2016 +0000
+++ b/trainingdb/Dockerfile	Wed Jan 20 20:15:49 2016 +0000
@@ -1,5 +1,3 @@
-#
-# Docker file to create postgres image for ssdt applications
 
 FROM docker.ssdt.io/ssdt-postgres:2
 
@@ -8,6 +6,6 @@
 ENV PGDATA=/var/pgdata/trainingdata \
     BACKUP_FILE=/training.backup.gz
 
-COPY setupDatabase.sh /docker-entrypoint-initdb.d/
+COPY setupDatabase.sh /docker-entrypoint-initdb.d/setupDatabase.sh
 
 RUN chmod 755 /docker-entrypoint-initdb.d/setupDatabase.sh