Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SMART
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UNI-KLU
SMART
Commits
3414bdc1
Commit
3414bdc1
authored
Sep 02, 2020
by
Manuel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
businessLogic: updated local mode
parent
cfa062b9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
main.py
...participation-hub/business-logic-microservice/app/main.py
+6
-4
requirements.txt
...tion-hub/business-logic-microservice/app/requirements.txt
+4
-0
No files found.
src/participation-hub/business-logic-microservice/app/main.py
View file @
3414bdc1
...
...
@@ -12,6 +12,7 @@ if os.path.exists(modules_path):
# load swagger config
import
connexion
from
security
import
swagger_util
from
env_info
import
is_running_locally
app
=
connexion
.
App
(
__name__
,
specification_dir
=
'configs/'
)
...
...
@@ -28,16 +29,17 @@ 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
# Local Mode
try
:
if
is_running_locally
():
# Local Mode
print
(
"Running with local settings..."
)
local
=
os
.
environ
[
'ARTICONF_LOCAL'
]
app
.
add_api
(
swagger_util
.
get_bundled_specs
(
Path
(
"configs/swagger_local.yml"
)),
resolver
=
connexion
.
RestyResolver
(
"cms_rest_api"
))
except
KeyError
:
context
=
'adhoc'
else
:
app
.
add_api
(
swagger_util
.
get_bundled_specs
(
Path
(
"configs/swagger.yml"
)),
resolver
=
connexion
.
RestyResolver
(
"cms_rest_api"
))
# start app
if
__name__
==
'__main__'
:
print
(
context
)
app
.
run
(
host
=
'0.0.0.0'
,
port
=
5000
,
debug
=
False
,
ssl_context
=
context
)
src/participation-hub/business-logic-microservice/app/requirements.txt
View file @
3414bdc1
...
...
@@ -2,11 +2,13 @@ astroid==2.4.2
attrs==19.3.0
autopep8==1.5.4
certifi==2020.6.20
cffi==1.14.2
chardet==3.0.4
click==7.1.2
clickclick==1.2.2
colorama==0.4.3
connexion==2.7.0
cryptography==3.1
Flask==1.1.2
idna==2.10
importlib-metadata==1.7.0
...
...
@@ -21,11 +23,13 @@ mccabe==0.6.1
openapi-spec-validator==0.2.9
prance==0.19.0
pycodestyle==2.6.0
pycparser==2.20
pylint==2.5.3
pymongo==3.11.0
pyrsistent==0.16.0
PyYAML==5.3.1
requests==2.24.0
rope==0.17.0
semver==2.10.2
six==1.15.0
swagger-ui-bundle==0.0.8
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment