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
78fdd011
Commit
78fdd011
authored
Aug 03, 2021
by
Manuel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed unneccessary Dockerfile
parent
13dd065e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
15 deletions
+16
-15
main.py
src/data-hub/reputation-calculation-microservice/app/main.py
+16
-9
Dockerfile
src/demo/demo-backend/nginx/Dockerfile
+0
-6
No files found.
src/data-hub/reputation-calculation-microservice/app/main.py
View file @
78fdd011
...
...
@@ -17,6 +17,7 @@ LOGGER = logging.getLogger(__name__)
import
connexion
from
security
import
swagger_util
from
env_info
import
is_running_locally
,
get_resources_path
import
env_info
from
flask
import
request
from
flask
import
redirect
...
...
@@ -37,18 +38,24 @@ def before_request():
def
api_root
():
return
redirect
(
'/api/ui'
)
# SSL configuration
certificate_path
=
get_resources_path
()
context
=
(
os
.
path
.
normpath
(
f
'{certificate_path}/articonf1.crt'
),
os
.
path
.
normpath
(
f
'{certificate_path}/articonf1.key'
))
# certificate and key files
if
is_running_locally
():
print
(
"Running locally..."
)
app
.
add_api
(
swagger_util
.
get_bundled_specs
(
Path
(
"configs/swagger_local.yml"
)),
resolver
=
connexion
.
RestyResolver
(
"cms_rest_api"
))
if
not
env_info
.
is_running_locally
():
swagger_path
=
"configs/swagger.yml"
# SSL configuration
certificate_path
=
env_info
.
get_resources_path
()
context
=
(
os
.
path
.
normpath
(
f
'{certificate_path}/articonf1.crt'
),
os
.
path
.
normpath
(
f
'{certificate_path}/articonf1.key'
))
# certificate and key files
else
:
app
.
add_api
(
swagger_util
.
get_bundled_specs
(
Path
(
"configs/swagger.yml"
)),
print
(
"Running locally..."
)
swagger_path
=
"configs/swagger_local.yml"
context
=
None
app
.
add_api
(
swagger_util
.
get_bundled_specs
(
Path
(
swagger_path
)),
resolver
=
connexion
.
RestyResolver
(
"cms_rest_api"
))
# start app
if
__name__
==
'__main__'
:
app
.
run
(
host
=
'0.0.0.0'
,
port
=
5000
,
debug
=
True
,
use_reloader
=
False
,
ssl_context
=
context
)
# disable reloader so only subscribed once to rabbitmq
app
.
run
(
host
=
'0.0.0.0'
,
port
=
5000
,
ssl_context
=
context
,
debug
=
True
)
src/demo/demo-backend/nginx/Dockerfile
deleted
100644 → 0
View file @
13dd065e
FROM
nginx:1.15.8
RUN
rm
/etc/nginx/nginx.conf
COPY
nginx.conf /etc/nginx/
RUN
rm
/etc/nginx/conf.d/default.conf
COPY
project.conf /etc/nginx/conf.d/
\ No newline at end of file
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