Skip to content

Commit

Permalink
Made DB_URI an environment var
Browse files Browse the repository at this point in the history
  • Loading branch information
wangz10 committed May 11, 2019
1 parent b421859 commit a75508f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ ADD . /my_application

# Install required python packages
RUN pip install -r /my_application/requirements.txt
RUN pip install pandas==0.16.0

# Expose ports
EXPOSE 5000
Expand Down
4 changes: 2 additions & 2 deletions config.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'''
Config objects.
'''

import os
class Config(object):
"""Default configs"""
DEBUG = False
Expand Down Expand Up @@ -39,7 +39,7 @@ class Config(object):


class ProductionConfig(Config):
DATABASE_URI = 'mongodb://146.203.54.131:27017/'
DATABASE_URI = os.environ['DATABASE_URI']
HOST = '0.0.0.0'


Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
numpy==1.11.0
scipy==0.17.0
pandas==0.16.0
requests==2.6.2
flask==0.10.1
pymongo==3.2.2
joblib==0.8.4

0 comments on commit a75508f

Please sign in to comment.