From ce5620eb18b9e71f14d4ff26ed5cb44b8c5af09a Mon Sep 17 00:00:00 2001 From: Viktor Roytman Date: Fri, 9 Dec 2016 15:06:45 -0500 Subject: [PATCH] Update install script --- prod/create_initial_user.py | 2 +- prod/docker-compose.yml | 2 +- prod/install.sh | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/prod/create_initial_user.py b/prod/create_initial_user.py index d0035c7..66d36aa 100755 --- a/prod/create_initial_user.py +++ b/prod/create_initial_user.py @@ -19,7 +19,7 @@ def main(): parse_command_line([None] + others) from minigrid.options import options if not any(other.startswith('--db_schema=') for other in others): - options.db_schema = 'minigrid_dev' + options.db_schema = 'minigrid' from minigrid import models engine = models.create_engine() session = sessionmaker(bind=engine, autocommit=True)() diff --git a/prod/docker-compose.yml b/prod/docker-compose.yml index 4c63ab4..ae46464 100644 --- a/prod/docker-compose.yml +++ b/prod/docker-compose.yml @@ -1,7 +1,7 @@ version: '2' services: minigrid: - image: selcolumbia/minigrid-server:0.1.0.0 + image: selcolumbia/minigrid-server:0.1.0.1 command: ./prod/run.sh --db_host=db --redis_url=redis://redis:6379/0 --minigrid-website-url=https://www.example.com depends_on: - redis diff --git a/prod/install.sh b/prod/install.sh index 0028131..ac07f79 100755 --- a/prod/install.sh +++ b/prod/install.sh @@ -1,5 +1,5 @@ #!/usr/bin/env sh -# Minigrid Server installer for version 0.1.0.0 +# Minigrid Server installer for version 0.1.0.1 set -e # Do you have docker installed? @@ -108,8 +108,8 @@ $SUDO openssl dhparam -out /etc/letsencrypt/live/$LETSENCRYPT_DIR/dhparam.pem 20 printf "========================================\n" printf " Generating configuration \n" printf "========================================\n" -$CURL -L https://raw.githubusercontent.com/SEL-Columbia/minigrid-server/0.1.0.0/prod/docker-compose.yml > docker-compose.yml -$CURL -L https://raw.githubusercontent.com/SEL-Columbia/minigrid-server/0.1.0.0/prod/nginx.conf > nginx.conf +$CURL -L https://raw.githubusercontent.com/SEL-Columbia/minigrid-server/0.1.0.1/prod/docker-compose.yml > docker-compose.yml +$CURL -L https://raw.githubusercontent.com/SEL-Columbia/minigrid-server/0.1.0.1/prod/nginx.conf > nginx.conf sed -i s/www.example.com/$LETSENCRYPT_DIR/g docker-compose.yml sed -i s/www.example.com/$LETSENCRYPT_DIR/g nginx.conf @@ -134,7 +134,7 @@ if [ -f /etc/redhat-release ] ; then fi $DOCKER_COMPOSE up -d MINIGRID_CONTAINER_NAME=$($DOCKER_COMPOSE ps | grep _minigrid_ | cut -d' ' -f1) -docker exec $MINIGRID_CONTAINER_NAME "prod/create_initial_user.py $ADMIN_EMAIL" +docker exec $MINIGRID_CONTAINER_NAME ""prod/create_initial_user.py --db-host=db $ADMIN_EMAIL"" NGINX_CONTAINER_NAME=$($DOCKER_COMPOSE ps | grep _nginx_ | cut -d' ' -f1) # Let's Encrypt auto-renew (for now this is a cron job).