[chronojump-server] Added howto_compujump_server.txt



commit 503bd8493ab8786a3017f44577e3099c3041c2b8
Author: Xavier de Blas <xaviblas gmail com>
Date:   Wed Aug 2 19:18:08 2017 +0200

    Added howto_compujump_server.txt

 howto_compujump_server.txt |  136 ++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 136 insertions(+), 0 deletions(-)
---
diff --git a/howto_compujump_server.txt b/howto_compujump_server.txt
new file mode 100644
index 0000000..178fa05
--- /dev/null
+++ b/howto_compujump_server.txt
@@ -0,0 +1,136 @@
+----------------
+0. PREREQUISITES
+----------------
+
+Install Debian 9 XFCE
+
+# apt-get update
+# apt-get install mysql-server default-libmysqlclient-dev gunicorn python-dev python-virtualenv python-pip 
vim git
+
+if you want to enter by RDP
+
+# apt-get install RDP
+
+
+--------
+1. MYSQL
+--------
+
+# mysql
+# create database chronojump;
+
+--------------------
+2a. GUNICORN install
+--------------------
+
+vim /etc/gunicorn.d/chronojump-api.conf
+//don't need to change the 0.0.0.0. TODO: check this
+
+CONFIG = {
+        'mode': 'wsgi',
+        'environment': {
+                'PYTHONPATH': '/srv/api-app/venv/lib/python2.7/site-packages/'
+        },
+        'working_dir': '/srv/api-app',
+        'python': '/srv/api-app/venv/bin/python',
+        'args': (
+                '--bind=0.0.0.0:8080',
+                '--workers=4',
+                '--error-logfile=/srv/log/gunicorn/error.log',
+                '--access-logfile=/srv/log/gunicorn/access.log',
+                '--user=api',
+                '--group=api',
+                'main:app',
+        ),
+}
+
+# mkdir /ect/gunicorn.d
+# vim /etc/chronojump.conf
+
+[api]
+debug=True
+port=8080
+; port no utilitzat si es fa servir gunicorn
+backtraces_directory=/srv/backtraces
+chronojump_stable_version=1.7.1.0
+
+[db]
+server=localhost
+user=root
+password=***********
+name=chronojump
+
+[notification_emails]
+from=server chronojump org
+to=info chronojump org
+subject=Chronojump error log
+
+[security]
+secret_key=holaManola
+
+# cd /srv
+# mkdir log
+# cd log
+# mkdir gunicorn
+# cd ..
+# mkdir backtraces
+# mkdir api-app
+# chown chronojump api-app
+git://git.gnome.org/chronojump-server
+$ cd api-app
+$ git clone git://git.gnome.org/chronojump-server .
+$ virtualenv venv
+$ cd venv
+$ pip install -r ../requirements.txt (veig que s'havia de fer fora del venv, pq sino el gunicorn no ho troba 
Flask ni Flask-Autodoc
+$ pip install Flask (l'he hagut de instal.lar a part pq fallava)
+$ cd ..
+$ . venv/bin/activate
+
+# cd /srv/api-app
+# pip install -r requirements.txt
+# vim /usr/local/bin/start_chronojump_server.sh (change the 0.0.0.0 to server IP)
+
+------------------------------
+#!/bin/bash
+
+killall gunicorn
+cd /srv/api-app
+. venv/bin/activate
+nohup gunicorn --bind=0.0.0.0:8080 --workers=4 --error-logfile=/srv/log/gunicorn/error.log 
--access-logfile=/srv/log/gunicorn/access.log main:app > /dev/null 2> /dev/null &
+------------------------------
+
+# chmod +x /usr/local/bin/start_chronojump_server.sh
+
+--------------------
+2b. GUNICORN start
+--------------------
+
+# /usr/local/bin/start_chronojump_server.sh
+
+-----------------
+3.  FLASK install
+-----------------
+
+# apt-get install python-flask
+NO: /srv/api-app/chronojump-flask$ . venv/bin/activate
+NO: /srv/api-app/chronojump-flask$ . venv/bin/activate
+
+FLASK_APP="chronojumpserver" /srv/api-app/venv/bin/flask run --host 0.0.0.0
+
+/srv/api-app$ virtualenv venv
+/srv/api-app$ source venv/bin/activate
+pip install -e .
+
+copy logo_club.png to /srv/api-app/chronojumpserver/static/images
+
+---------------
+3.  FLASK start
+---------------
+
+//don't need to be on venv environment
+//change 0.0.0.0 to server IP
+# FLASK_APP="chronojumpserver" /srv/api-app/venv/bin/flask run --host 0.0.0.0
+
+Add stations and exercises on the website serverip:5000
+
+Check RFID is working ok


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]