Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
nopaque
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SFB 1288 - INF
nopaque
Commits
19338ba8
Commit
19338ba8
authored
4 years ago
by
Patrick Jentsch
Browse files
Options
Downloads
Patches
Plain Diff
Add daemon loop
parent
5427698a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
.env.tpl
+4
-0
4 additions, 0 deletions
.env.tpl
web/Dockerfile
+0
-1
0 additions, 1 deletion
web/Dockerfile
web/app/models.py
+1
-1
1 addition, 1 deletion
web/app/models.py
web/boot.sh
+17
-12
17 additions, 12 deletions
web/boot.sh
web/nopaque-daemon.sh
+7
-0
7 additions, 0 deletions
web/nopaque-daemon.sh
with
29 additions
and
14 deletions
.env.tpl
+
4
−
0
View file @
19338ba8
...
@@ -111,6 +111,10 @@ NOPAQUE_ADMIN=
...
@@ -111,6 +111,10 @@ NOPAQUE_ADMIN=
# Swarm nodes
# Swarm nodes
# NOPAQUE_DATA_DIR=
# NOPAQUE_DATA_DIR=
# CHOOSE ONE: False, True
# DEFAULT: False
# NOPAQUE_DAEMON_ENABLED=
# DEFAULT: 0.0.0.0
# DEFAULT: 0.0.0.0
# NOPAQUE_HOST=
# NOPAQUE_HOST=
...
...
This diff is collapsed.
Click to expand it.
web/Dockerfile
+
0
−
1
View file @
19338ba8
...
@@ -17,7 +17,6 @@ RUN apt-get update \
...
@@ -17,7 +17,6 @@ RUN apt-get update \
&&
apt-get
install
--no-install-recommends
--yes
\
&&
apt-get
install
--no-install-recommends
--yes
\
build-essential
\
build-essential
\
libpq-dev
\
libpq-dev
\
wait-for-it
\
&&
rm
-r
/var/lib/apt/lists/
*
&&
rm
-r
/var/lib/apt/lists/
*
...
...
This diff is collapsed.
Click to expand it.
web/app/models.py
+
1
−
1
View file @
19338ba8
...
@@ -35,7 +35,7 @@ class Role(db.Model):
...
@@ -35,7 +35,7 @@ class Role(db.Model):
# Fields
# Fields
default
=
db
.
Column
(
db
.
Boolean
,
default
=
False
,
index
=
True
)
default
=
db
.
Column
(
db
.
Boolean
,
default
=
False
,
index
=
True
)
name
=
db
.
Column
(
db
.
String
(
64
),
unique
=
True
)
name
=
db
.
Column
(
db
.
String
(
64
),
unique
=
True
)
permissions
=
db
.
Column
(
db
.
Big
Integer
)
permissions
=
db
.
Column
(
db
.
Integer
)
# Relationships
# Relationships
users
=
db
.
relationship
(
'
User
'
,
backref
=
'
role
'
,
lazy
=
'
dynamic
'
)
users
=
db
.
relationship
(
'
User
'
,
backref
=
'
role
'
,
lazy
=
'
dynamic
'
)
...
...
This diff is collapsed.
Click to expand it.
web/boot.sh
+
17
−
12
View file @
19338ba8
#!/bin/bash
#!/bin/bash
source
venv/bin/activate
while
true
;
do
if
[[
"
${
NOPAQUE_DAEMON_ENABLED
}
"
==
"True"
]]
;
then
flask deploy
echo
"Starting nopaque daemon..."
if
[[
"
$?
"
==
"0"
]]
;
then
./nopaque-daemon.sh &
break
fi
fi
echo
Deploy
command
failed, retrying
in
5 secs...
source
venv/bin/activate
sleep
5
done
if
[[
"$#"
-eq
0
]]
;
then
if
[[
"
${#}
"
-eq
0
]]
;
then
while
true
;
do
flask deploy
if
[[
"
${
?
}
"
==
"0"
]]
;
then
break
fi
echo
Deploy
command
failed, retrying
in
5 secs...
sleep
5
done
python nopaque.py
python nopaque.py
elif
[[
"
$
1
"
==
"flask"
]]
;
then
elif
[[
"
$
{
1
}
"
==
"flask"
]]
;
then
exec
${
@
:1
}
exec
${
@
:1
}
else
else
echo
"
$
0
[COMMAND]"
echo
"
$
{
0
}
[COMMAND]"
echo
""
echo
""
echo
"nopaque startup script"
echo
"nopaque startup script"
echo
""
echo
""
...
...
This diff is collapsed.
Click to expand it.
web/nopaque-daemon.sh
0 → 100755
+
7
−
0
View file @
19338ba8
#!/bin/bash
source
venv/bin/activate
while
true
;
do
flask tasks
sleep
10
done
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment