-
Install dependencies:
nginx,uwsgi(python),flask(python),github-flask(python),numpy(python),sep(python),pillow(python) -
Clone the repository to a useful location
-
Edit
findingchart.inito setuid =your username -
Edit
findingchart.serviceto point to setUser=your usernameWorkingDirectory=project location
-
Copy
findingchart.serviceto/usr/lib/systemd/system/ -
Add user to the
nginxgroup:sudo usermod -a -G <user> nginx -
chmod g+xeach directory in the path to the project -
Enable and start the service
sudo systemctl start findingchart sudo systemctl enable findingchart -
Create / update nginx config to include:
location /findingchart/static { alias <project path>/static; } location /findingchart/ { uwsgi_pass unix:<project path>/findingchart.sock; uwsgi_param SCRIPT_NAME /findingchart; include uwsgi_params; } -
Enable and start the
nginxservice. -
Open the firewall if needed
sudo firewall-cmd --permanent --zone=public --add-service=http
sudo firewall-cmd --reload`