Skip to content

Commit

Permalink
Merge pull request #223 from SEL-Columbia/staging
Browse files Browse the repository at this point in the history
0.2.4
  • Loading branch information
vr2262 committed Dec 16, 2015
2 parents 0a69406 + 130fe6a commit 6f81f45
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ nginx:
- /etc/letsencrypt:/etc/letsencrypt
- /tmp:/tmp
webapp:
image: "selcolumbia/dokomoforms:0.2.3"
image: "selcolumbia/dokomoforms:0.2.4"
command: bash -c "./docker-wait-for-postgres.sh db && head -c 24 /dev/urandom > cookie_secret && python webapp.py"
links:
- "db:db"
Expand Down
13 changes: 7 additions & 6 deletions installer.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env sh
# Dokomo Forms installer for version 0.2.3
# Dokomo Forms installer for version 0.2.4
set -e

# Do you have docker installed?
Expand Down Expand Up @@ -104,8 +104,8 @@ $SUDO openssl dhparam -out /etc/letsencrypt/live/$LETSENCRYPT_DIR/dhparam.pem 20
printf "========================================\n"
printf " Downloading configuration files \n"
printf "========================================\n"
$CURL -O https://raw.githubusercontent.com/SEL-Columbia/dokomoforms/v0.2.3/docker-compose.yml
$CURL -O https://raw.githubusercontent.com/SEL-Columbia/dokomoforms/v0.2.3/nginx.conf
$CURL -O https://raw.githubusercontent.com/SEL-Columbia/dokomoforms/v0.2.4/docker-compose.yml
$CURL -O https://raw.githubusercontent.com/SEL-Columbia/dokomoforms/v0.2.4/nginx.conf

# Edit the configuration files
printf "========================================\n"
Expand All @@ -121,7 +121,7 @@ printf "This will be displayed as part of the \n"
printf "title of the website. \n"
printf "Organization name:\n>>> "
read ORGANIZATION
printf "organization = '$ORGANIZATION'\n" >> local_config.py
printf "organization = '''$ORGANIZATION'''\n" >> local_config.py

printf "\n"
printf "Please enter an e-mail address for the \n"
Expand All @@ -146,9 +146,10 @@ printf "========================================\n"
printf " Adding monthly cron job to renew SSL \n"
printf " certificate. \n"
printf "========================================\n"
CRON_CMD="mkdir -p /tmp/letsencrypt-auto && docker run -it --rm --name letsencrypt -v /etc/letsencrypt:/etc/letsencrypt:Z -v /var/lib/letsencrypt:/var/lib/letsencrypt:Z -v /tmp/letsencrypt-auto:/tmp/letsencrypt-auto:Z -v /var/log/letsencrypt:/var/log/letsencrypt:Z quay.io/letsencrypt/letsencrypt --renew certonly -a webroot -w /tmp/letsencrypt-auto $DOMAIN_ARGS && docker restart $USER_nginx_1"
CRON_CMD="mkdir -p /tmp/letsencrypt-auto && docker run -it --rm --name letsencrypt -v /etc/letsencrypt:/etc/letsencrypt:Z -v /var/lib/letsencrypt:/var/lib/letsencrypt:Z -v /tmp/letsencrypt-auto:/tmp/letsencrypt-auto:Z -v /var/log/letsencrypt:/var/log/letsencrypt:Z quay.io/letsencrypt/letsencrypt --renew certonly -a webroot -w /tmp/letsencrypt-auto $DOMAIN_ARGS && docker restart ${USER}_nginx_1"
CRON_JOB="0 0 1 * * $CRON_CMD"
( crontab -l | fgrep -i -v "$CRON_CMD" ; echo "$CRON_JOB" ) | crontab -
cat <(fgrep -i -v "$CRON_CMD" <(crontab -l)) <(echo "$CRON_JOB") | crontab -
crontab -l

# Bring up Dokomo Forms
printf "========================================\n"
Expand Down

0 comments on commit 6f81f45

Please sign in to comment.