diff --git a/docker-compose.yml b/docker-compose.yml index 799ebfd2..6d6547f2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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" diff --git a/installer.sh b/installer.sh index 97056425..1349ce45 100755 --- a/installer.sh +++ b/installer.sh @@ -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? @@ -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" @@ -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" @@ -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"