Skip to content

Commit

Permalink
Update version number
Browse files Browse the repository at this point in the history
  • Loading branch information
vr2262 committed Apr 13, 2017
1 parent 360b051 commit 2b1f200
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Shared Solar server
$ python3.6 -m venv venv
$ source venv/bin/activate
(venv) $ pip install -r requirements.txt -r dev/requirements.txt
(venv) $ ./dev/run.sh
(venv) $ ./dev/run.sh
[I 170329 16:07:16 server:28] Debug mode is on
Listening on port 8888
[I 170329 16:07:16 server:50] Application started
Expand All @@ -24,7 +24,7 @@ $ docker-compose -f dev/docker-compose.yml ps
--------------------------------------------------------------------------------
dev_db_1 docker-entrypoint.sh postgres Up 5432/tcp
dev_minigrid_1 ./dev/run.sh --db_host=db ... Up 0.0.0.0:8888->8888/tcp
dev_redis_1 docker-entrypoint.sh redis ... Up 6379/tcp
dev_redis_1 docker-entrypoint.sh redis ... Up 6379/tcp
```


Expand Down
4 changes: 3 additions & 1 deletion minigrid/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ def _pack_into_dict(session, binary):
message = block[1:]
result[block_id] = message.hex()
minigrid_id = str(UUID(unhexlify(result[6]).decode('ascii')))
minigrid = models.get_minigrid(session, minigrid_id)
minigrid = models.get_minigrid(session, minigrid_id, None)
key = minigrid.aes_key
cipher = Cipher(AES(key), modes.ECB(), backend=default_backend())
for block_index, value in result.items():
Expand Down Expand Up @@ -560,6 +560,8 @@ def post(self):
device_address = unhexlify(binary[:12]) # TODO: deal with multi-user -- exclusive lock?
body = binary[12:]
cache.set('device_active', 1, 5)
if len(body) == 0:
return
payload = _pack_into_dict(self.session, body)
cache.set('received_info', payload, 5)
device_info = cache.get('device_info')
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.6-dev13
image: selcolumbia/minigrid-server:0.1.6-dev14
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
6 changes: 3 additions & 3 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.6-dev13
# Minigrid Server installer for version 0.1.6-dev14
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.6-dev13/prod/docker-compose.yml > docker-compose.yml
$CURL -L https://raw.githubusercontent.com/SEL-Columbia/minigrid-server/0.1.6-dev13/prod/nginx.conf > nginx.conf
$CURL -L https://raw.githubusercontent.com/SEL-Columbia/minigrid-server/0.1.6-dev14/prod/docker-compose.yml > docker-compose.yml
$CURL -L https://raw.githubusercontent.com/SEL-Columbia/minigrid-server/0.1.6-dev14/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 Down

0 comments on commit 2b1f200

Please sign in to comment.