Browse Source

Merging, and updating FROM JUPITER

master
Charles Reid 2 years ago
parent
commit
b832a3407a
4 changed files with 25 additions and 2 deletions
  1. +0
    -0
      LICENSE
  2. +21
    -0
      startup_script.sh
  3. +2
    -1
      test/test_mongo_insert.py
  4. +2
    -1
      test/test_mongo_read.py

+ 0
- 0
LICENSE View File


+ 21
- 0
startup_script.sh View File

@@ -0,0 +1,21 @@
#!/bin/bash
#
# This script should be made executable
# and called in /etc/rc.local
# by the desired user:
#
# su charles -c '/path/to/script'

# remove crusty processes
docker ps -qa | xargs -I% docker rm -f %

sleep 5;

# run mongodb
/home/charles/codes/docker/d-mongodb/run_mongodb.sh

sleep 5;

# run mongo express
/home/charles/codes/docker/d-mongoexpress/run_stock.sh


+ 2
- 1
test/test_mongo_insert.py View File

@@ -2,7 +2,8 @@ from pymongo import MongoClient
import random
from datetime import datetime

client = MongoClient('10.6.0.1', 27017)
client = MongoClient('10.6.0.2', 27017)
#client = MongoClient('127.0.0.1', 27017)
db = client.test_database
collection = db.test_collection



+ 2
- 1
test/test_mongo_read.py View File

@@ -6,7 +6,8 @@ Test Read
Tests the ability to read records from the database.
"""

client = MongoClient('10.6.0.1', 27017)
#client = MongoClient('10.6.0.1', 27017)
client = MongoClient('127.0.0.1', 27017)
db = client.test_database
collection = db.test_collection



Loading…
Cancel
Save