Commit 4be39f14 authored by Robin Knapp's avatar Robin Knapp

introduced deplyoment env in config

parent 428ac03e
......@@ -59,6 +59,8 @@ COPY --chown=naiades src $FLASK_HOME_DIR/src/
COPY --chown=naiades specs $SPECS_HOME_DIR/
COPY --chown=naiades requirements.txt $FLASK_HOME_DIR/requirements.txt
COPY --chown=naiades start_service.sh $FLASK_HOME_DIR/
RUN chmod -R 744 $FLASK_HOME_DIR
RUN chown -R naiades $FLASK_HOME_DIR
#________________________________________
WORKDIR $FLASK_HOME_DIR
......
......@@ -22,7 +22,7 @@ def create_app():
""" Return the flask api object that contains the routes and views. Function is called for instantiation
by gunicorn server """
develop = False
develop = False if config.DEPLOYMENT_ENV == 'PROD' else True
# configure app and routes
app = Flask(__name__, instance_relative_config=True)
......
......@@ -2,6 +2,8 @@
import os
DEPLOYMENT_ENV = 'PROD' # PROD or DEV
APP_CONFIG = {
'SPECS_TIMEOUT_SEC': os.environ.get('SPECS_TIMEOUT_SEC', 10),
'PLATFORM_TIMEOUT_SEC': os.environ.get('PLATFORM_TIMEOUT_SEC', 10),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment