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
c7776171
Commit
c7776171
authored
Jul 30, 2020
by
Manuel
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/feature/authentication' into feature/authentication
parents
79b47008
1d92de52
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
4 deletions
+29
-4
swagger.yml
...role-stage-discovery-microservice/app/configs/swagger.yml
+1
-1
main.py
src/data-hub/role-stage-discovery-microservice/app/main.py
+5
-1
requirements.txt
...ub/role-stage-discovery-microservice/app/requirements.txt
+1
-0
deployment.yml
...le-stage-discovery-microservice/deployment/deployment.yml
+8
-0
Dockerfile
tools/welcome-page/Dockerfile
+5
-1
main.py
tools/welcome-page/main.py
+9
-1
No files found.
src/data-hub/role-stage-discovery-microservice/app/configs/swagger.yml
View file @
c7776171
...
...
@@ -6,7 +6,7 @@ info:
# Import security definitions from global security definition
securityDefinitions
:
$ref
:
'
../
../../../modules/
security/security.yml#securityDefinitions'
$ref
:
'
../security/security.yml#securityDefinitions'
consumes
:
-
"
application/json"
...
...
src/data-hub/role-stage-discovery-microservice/app/main.py
View file @
c7776171
...
...
@@ -26,7 +26,11 @@ def api_root():
return
'Endpoint of role-stage-discovery-microservice!'
# 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
if
__name__
==
'__main__'
:
...
...
src/data-hub/role-stage-discovery-microservice/app/requirements.txt
View file @
c7776171
...
...
@@ -39,6 +39,7 @@ requests==2.22.0
rope==0.16.0
scikit-learn==0.22.1
scipy==1.4.1
semver==2.10.2
six==1.14.0
swagger-ui-bundle==0.0.6
typed-ast==1.4.1
...
...
src/data-hub/role-stage-discovery-microservice/deployment/deployment.yml
View file @
c7776171
...
...
@@ -32,6 +32,14 @@ spec:
image
:
alexx882/role-stage-discovery-microservice
ports
:
-
containerPort
:
5000
volumeMounts
:
-
mountPath
:
/srv/articonf
name
:
articonf
volumes
:
-
name
:
articonf
hostPath
:
path
:
/srv/articonf
type
:
Directory
---
apiVersion
:
v1
kind
:
Service
...
...
tools/welcome-page/Dockerfile
View file @
c7776171
...
...
@@ -18,3 +18,7 @@ COPY templates/ /app/templates/
RUN
chmod
a+x main.py
CMD
["python", "./main.py"]
# docker build -t alexx882/hello-articonf .
# docker run --name articonf-home -p 80:5000 -v /srv/articonf:/srv/articonf -d alexx882/hello-articonf
# docker run --name articonf-home-ssl -p 443:5000 -v /srv/articonf:/srv/articonf -d alexx882/hello-articonf
\ No newline at end of file
tools/welcome-page/main.py
View file @
c7776171
import
os
from
flask
import
Flask
,
render_template
app
=
Flask
(
__name__
)
...
...
@@ -6,4 +7,11 @@ app = Flask(__name__)
def
hello_world
():
return
render_template
(
'index.html'
)
app
.
run
(
host
=
'0.0.0.0'
,
port
=
5000
,
debug
=
True
)
\ No newline at end of file
# SSL configuration
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
app
.
run
(
host
=
'0.0.0.0'
,
port
=
5000
,
debug
=
False
,
ssl_context
=
context
)
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