Skip to content

Commit

Permalink
Update install script
Browse files Browse the repository at this point in the history
  • Loading branch information
vr2262 committed Dec 9, 2016
1 parent 855772e commit ce5620e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion prod/create_initial_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)()
Expand Down
2 changes: 1 addition & 1 deletion prod/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 4 additions & 4 deletions prod/install.sh
Original file line number Diff line number Diff line change
@@ -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?
Expand Down Expand Up @@ -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
Expand All @@ -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).
Expand Down

0 comments on commit ce5620e

Please sign in to comment.