Commit 02ab9705 authored by Manuel's avatar Manuel

restGateway: changed certificate configuration

parent e027a0c4
...@@ -24,7 +24,8 @@ ROLESTAGE_DISCOVERY_DB_PORT = 27017 ...@@ -24,7 +24,8 @@ ROLESTAGE_DISCOVERY_DB_PORT = 27017
## Rest Gateway ## Rest Gateway
# REST_GATEWAY_HOSTNAME = 'rest-gateway' # REST_GATEWAY_HOSTNAME = 'rest-gateway'
REST_GATEWAY_HOSTNAME = 'rest-gateway' # REST_GATEWAY_DB_HOSTNAME = 'rest-gateway-db'
REST_GATEWAY_REST_PORT = 80 REST_GATEWAY_HOSTNAME = 'articonf1.itec.aau.at'
REST_GATEWAY_DB_HOSTNAME = 'rest-gateway-db' REST_GATEWAY_REST_PORT = 30401
REST_GATEWAY_DB_PORT = 27017 REST_GATEWAY_DB_HOSTNAME = 'articonf1.itec.aau.at'
\ No newline at end of file REST_GATEWAY_DB_PORT = 30402
\ No newline at end of file
...@@ -31,7 +31,11 @@ def api_root(): ...@@ -31,7 +31,11 @@ def api_root():
return 'Endpoint of SMART RESTful API Gateway!' return 'Endpoint of SMART RESTful API Gateway!'
# SSL configuration # SSL configuration
context = (f'{modules_path}/certificate/articonf1.crt', f'{modules_path}/certificate/articonf1.key') # certificate and key files try:
certificate_path = os.environ['ARTICONF_CERTIFICATE_PATH']
except KeyError:
certificate_path = '/srv/articonf/'
context = (os.path.normpath(f'{certificate_path}/articonf1.crt'), os.path.normpath(f'{certificate_path}/articonf1.key')) # certificate and key files
# start app # start app
if __name__ == '__main__': if __name__ == '__main__':
......
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