Skip to content

Commit

Permalink
added ability to specify mongo port
Browse files Browse the repository at this point in the history
  • Loading branch information
adpham95 committed Nov 7, 2019
1 parent f85e66b commit fd83c15
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
6 changes: 4 additions & 2 deletions api/server/db/mongo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ class MongoManager(object):
def __init__(self):
self.async_client = motor.motor_asyncio.AsyncIOMotorClient(username=config.DB_USERNAME,
password=config.get_from_file(config.MONGO_KEY_PATH),
host=config.MONGO_HOST)
host=config.MONGO_HOST,
port=config.MONGO_PORT)

self.reg_client = pymongo.MongoClient(username=config.DB_USERNAME,
password=config.get_from_file(config.MONGO_KEY_PATH),
host=config.MONGO_HOST)
host=config.MONGO_HOST,
port=config.MONGO_PORT)

self.init_db()

Expand Down
5 changes: 3 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ install:

before_build:
- docker swarm init --advertise-addr 127.0.0.1

build_script:
- ps: .\walkoff.ps1 up -bdy
- docker service ls

#build_script:


test_script:
- python -m pytest testing\api\

Expand Down
4 changes: 2 additions & 2 deletions bootloader/base-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ services:
networks:
- walkoff_network
ports:
- 27017:27017
- 27019:27019
environment:
- MONGO_INITDB_ROOT_USERNAME=walkoff
- MONGO_INITDB_ROOT_PASSWORD_FILE=/run/secrets/walkoff_mongo_key
Expand All @@ -95,7 +95,7 @@ services:
ports:
- 27018:8081
environment:
- ME_CONFIG_MONGODB_PORT=27017
- ME_CONFIG_MONGODB_PORT=27019
- ME_CONFIG_MONGODB_SERVER=resource_mongo
- ME_CONFIG_SITE_BASEURL=/mongo/
- ME_CONFIG_MONGODB_ADMINUSERNAME=walkoff
Expand Down
1 change: 1 addition & 0 deletions common/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ class Config:
DB_TYPE = os.getenv("DB_TYPE", "postgres")
DB_HOST = os.getenv("DB_HOST", Static.POSTGRES_SERVICE)
MONGO_HOST = os.getenv("MONGO_HOST", Static.MONGO_SERVICE)
MONGO_PORT = os.getenv("MONGO_PORT", "27019")
SERVER_DB_NAME = os.getenv("SERVER_DB", "walkoff")
EXECUTION_DB_NAME = os.getenv("EXECUTION_DB", "execution")
DB_USERNAME = os.getenv("DB_USERNAME", "walkoff")
Expand Down
1 change: 1 addition & 0 deletions data/local_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ API_GATEWAY_URI: "http://localhost:8081"
REDIS_URI: "redis://localhost:6379"
MINIO: "localhost:9001"
MONGO_HOST: "localhost"
MONGO_PORT: "27019"
SOCKETIO_URI: "http://localhost:3000"


Expand Down

0 comments on commit fd83c15

Please sign in to comment.