# HG changeset patch # User smith@nwoca.org # Date 1451244252 0 # Node ID 5643072a1af926dcd714b7d93c35b79875a7b82e # Parent 82b5ed864aee8c8a530ab84cd414530f48eee5b7 DEP-7: formalize ssdt-utils image. add template preview usas compose file diff -r 82b5ed864aee -r 5643072a1af9 compose/preview/usas.yml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/compose/preview/usas.yml Sun Dec 27 19:24:12 2015 +0000 @@ -0,0 +1,22 @@ +# base compose file for USAS preview release +usasdb: + restart: always + image: docker.ssdt.io/ssdt-postgres:2 + volumes: + - ./backup:/backup + environment: + - DB_NAME=usasdb + - DB_USER=usas + - DB_PASS=usasdefault +usasapp: + restart: always + image: docker.ssdt.io/usas-app:preview + volumes: + - ./config:/config + 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 82b5ed864aee -r 5643072a1af9 utils/Dockerfile --- a/utils/Dockerfile Sun Dec 27 18:00:03 2015 +0000 +++ b/utils/Dockerfile Sun Dec 27 19:24:12 2015 +0000 @@ -2,9 +2,21 @@ MAINTAINER Dave Smith smith@nwoca.org +ENV SSDT_HOME=/ssdt \ + SSDT_DOCKER=http://hg.ssdt-ohio.org/public/ssdt-docker/ + RUN apt-get update -y RUN apt-get install -y mercurial \ && apt-get install -y curl \ && apt-get install -y vim \ && apt-get install -y nano + +VOLUME /ssdt + +COPY ./docker-entrypoint.sh / + +RUN chmod a+x ./docker-entrypoint.sh + +ENTRYPOINT ["/docker-entrypoint.sh"] + diff -r 82b5ed864aee -r 5643072a1af9 utils/docker-entrypoint.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/utils/docker-entrypoint.sh Sun Dec 27 19:24:12 2015 +0000 @@ -0,0 +1,19 @@ +#!/bin/bash +set -e + +if [ "$1" = 'update' ]; then + cd $SSDT_HOME + if [ ! -d ".hg" ]; then + echo "cloning repository $SSDT_DOCKER to $SSDT_HOME" + mkdir -p $SSDT_HOME + hg init + fi + echo "pulling updates" + hg pull -y $SSDT_DOCKER + hg update default + +else + + exec "$@" + +fi \ No newline at end of file