Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PET-rating
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
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
Timo Heikkilä
PET-rating
Commits
d2274f14
Commit
d2274f14
authored
5 years ago
by
Ossi Laine
Browse files
Options
Downloads
Patches
Plain Diff
Updated readme
parent
2b6167a5
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+60
-1
60 additions, 1 deletion
README.md
with
60 additions
and
1 deletion
README.md
+
60
−
1
View file @
d2274f14
testi
# Online survey creation tool
\ No newline at end of file
### Prerequisites
Flask app with MariaDB
Check requirements.txt
### Installing
Install python packages with pip and preferably in virtual environment:
```
virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
```
### Deployment
There are multiple deployment options, but one working solution is:
nginx + gunicorn (with gevent worker)
Create systemd startup script in '/etc/systemd/system/gunicorn.service'
```
[Unit]
Description=Gunicorn instance to serve flask application
After=network.target
[Service]
User=nginx
WorkingDirectory=/srv/rating
Environment="PATH=/srv/rating/venv/bin"
ExecStart=/srv/rating/venv/bin/gunicorn run:app -b localhost:8000 -k gevent -w 1
[Install]
WantedBy=multi-user.target
```
Run 'systemctl daemon-reload' to reload units.
Enable and start gunicorn service:
```
service gunicorn enable
service gunicorn start
```
### Logs
Error logs are saved to application folder (/srv/rating/logs/)
Optionally with journalctl:
journalctl -u gunicorn.service
### Restart server after updates
```
service gunicorn restart
```
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