Commit fcf81362 authored by Romain Loth's avatar Romain Loth

ini config also for helper app

parent 68a2a795
......@@ -5,15 +5,20 @@ TODO integrate with new regcomex server
"""
from extractDataCustom import MyExtractor as MySQL
from flask import Flask, request
from json import dumps
from os import environ
from flask import Flask, request
from json import dumps
from os import environ
from configparser import ConfigParser
# ============= app creation ==============
app = Flask(__name__)
# ============= read environ ==============
MY_SQL_HOST = environ.get('SQL_HOST', '172.17.0.2')
MY_SQL_HOST = environ.get('SQL_HOST', None)
if not MY_SQL_HOST:
ini = ConfigParser()
ini.read("../parametres_comex.ini")
MY_SQL_HOST = ini['services']['SQL_HOST']
# ================= views =================
# @app.route("/getJSON") # route renamed
......
SQL_HOST = 172.17.0.2
[services]
SQL_HOST = 172.18.0.2
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