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
e0c01938
Commit
e0c01938
authored
Mar 16, 2021
by
Manuel Herold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added build files for automated build support
parent
9f51b022
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
70 additions
and
23 deletions
+70
-23
build.py
bin/build.py
+13
-22
Dockerfile
src/dashboard/Dockerfile
+2
-1
deployment.yml
src/dashboard/deployment/deployment.yml
+43
-0
nginx.conf
src/dashboard/deployment/nginx.conf
+12
-0
No files found.
bin/build.py
View file @
e0c01938
...
...
@@ -81,36 +81,27 @@ if __name__ == '__main__':
with
cd
(
path
):
print
(
f
"> flutter build web"
)
os
.
system
(
f
"flutter build web"
)
# copy Dockerfile into root dir to have access to modules folder
shutil
.
copy2
(
os
.
path
.
join
(
path
,
DOCKER_BUILD_NAME
),
ROOT
)
print
(
f
"> docker image build -t {image_name} {path}"
)
exit_val
=
os
.
system
(
f
"docker image build -t {image_name} {path}"
)
# build then remove Dockerfile
exit_val
=
os
.
system
(
f
"docker image build -t {image_name} {ROOT}"
)
os
.
remove
(
os
.
path
.
join
(
ROOT
,
DOCKER_BUILD_NAME
))
if
exit_val
!=
0
:
error
=
exit_val
else
:
print
(
f
"> docker push {image_name}"
)
exit_val
=
os
.
system
(
f
"docker push {image_name}"
)
else
:
# copy Dockerfile into root dir to have access to modules folder
shutil
.
copy2
(
os
.
path
.
join
(
path
,
DOCKER_BUILD_NAME
),
ROOT
)
res_str
.
append
(
f
"{image_name} built with exit code {exit_val}"
)
# build then remove Dockerfile
exit_val
=
os
.
system
(
f
"docker image build -t {image_name} {ROOT}"
)
os
.
remove
(
os
.
path
.
join
(
ROOT
,
DOCKER_BUILD_NAME
))
if
exit_val
!=
0
:
error
=
exit_val
res_str
.
append
(
f
"{image_name} built with exit code {exit_val}"
)
else
:
# push created Docker image
exit_val
=
os
.
system
(
f
"docker push {image_name}"
)
res_str
.
append
(
f
"{image_name} pushed with exit code {exit_val}"
)
if
exit_val
!=
0
:
error
=
exit_val
else
:
# push created Docker image
exit_val
=
os
.
system
(
f
"docker push {image_name}"
)
res_str
.
append
(
f
"{image_name} pushed with exit code {exit_val}"
)
if
exit_val
!=
0
:
error
=
exit_val
print
(
f
"Found {len(command_args)} images"
)
for
s
in
res_str
:
print
(
s
)
...
...
src/dashboard/Dockerfile
View file @
e0c01938
FROM
nginx:latest
EXPOSE
80
EXPOSE
443
COPY
./src/dashboard/deployment/nginx.conf /etc/nginx/conf.d/default.conf
COPY
./src/dashboard/build/web/ /usr/share/nginx/html/
\ No newline at end of file
src/dashboard/deployment/deployment.yml
0 → 100644
View file @
e0c01938
apiVersion
:
v1
kind
:
Service
metadata
:
name
:
dashboard
spec
:
type
:
LoadBalancer
selector
:
app
:
dashboard
ports
:
-
name
:
https
port
:
443
targetPort
:
443
nodePort
:
30469
protocol
:
TCP
---
apiVersion
:
apps/v1
kind
:
Deployment
metadata
:
name
:
dashboard
spec
:
replicas
:
1
selector
:
matchLabels
:
app
:
dashboard
template
:
metadata
:
labels
:
app
:
dashboard
spec
:
containers
:
-
name
:
dashboard
image
:
alexx882/dashboard
ports
:
-
containerPort
:
443
imagePullPolicy
:
Always
volumeMounts
:
-
mountPath
:
/certs
name
:
articonf
volumes
:
-
name
:
articonf
hostPath
:
path
:
/srv/articonf
type
:
Directory
\ No newline at end of file
src/dashboard/deployment/nginx.conf
0 → 100644
View file @
e0c01938
server
{
listen
443
ssl
;
server_name
demo
;
ssl_certificate
/certs/articonf1.crt
;
ssl_certificate_key
/certs/articonf1.key
;
location
/
{
root
/usr/share/nginx/html
;
try_files
$uri
/index.html
;
}
}
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