Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Webapps Deliverer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vaclab
Webapps Deliverer
Commits
a311d7ff
Commit
a311d7ff
authored
4 years ago
by
Rolf Niepraschk
Browse files
Options
Downloads
Patches
Plain Diff
flask port as parameter
parent
fa58ddae
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
server
+7
-3
7 additions, 3 deletions
server
webapps-deliverer.service
+2
-1
2 additions, 1 deletion
webapps-deliverer.service
with
9 additions
and
4 deletions
server
+
7
−
3
View file @
a311d7ff
#!/bin/bash
if
[
-z
"
$1
"
]
;
then
echo
"error: missing data path"
# $1 = flask port
# $2 = data path
if
[
$#
-lt
2
]
;
then
echo
"error: missing parameter"
exit
-1
fi
export
FLASK_RUN_PORT
=
"
$1
"
export
FLASK_APP
=
server.py
export
FLASK_DEBUG
=
1
export
FLASK_ENV
=
development
# TODO: FLASK_ENV=production
...
...
@@ -12,4 +16,4 @@ export FLASK_ENV=development # TODO: FLASK_ENV=production
python3
-m
venv ./
source
bin/activate
pip3
install
-e
.
python3 server.py
"
$
1
"
python3 server.py
"
$
2
"
This diff is collapsed.
Click to expand it.
webapps-deliverer.service
+
2
−
1
View file @
a311d7ff
...
...
@@ -4,13 +4,14 @@ After=network.target
[Service]
User
=
nobody
Environment
=
FLASK_PORT=8081
Environment
=
DATA_PATH=/srv/www/data/
Type
=
simple
StandardOutput
=
null
StandardError
=
null
Restart
=
no
WorkingDirectory
=
/usr/local/share/webapps-deliverer
ExecStart
=
/bin/bash -l -c "source bin/activate;./server ${DATA_PATH}"
ExecStart
=
/bin/bash -l -c "source bin/activate;./server
${FLASK_PORT}
${DATA_PATH}"
[Install]
WantedBy
=
multi-user.target
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