Denis Merigoux il y a 9 ans
Parent
commit
8968f3ca46
2 fichiers modifiés avec 49 ajouts et 2 suppressions
  1. 48 1
      README.md
  2. 1 1
      counter/templates/baseTemplate.html

+ 48 - 1
README.md

@@ -1 +1,48 @@
1
-# seum-counter
1
+# seum-counter
2
+
3
+## Installation
4
+
5
+Clone the repo, then create a `virtualenv` with Python 3, then install the required packages with :
6
+
7
+    pip install -r requirements.txt
8
+
9
+## Running the server
10
+
11
+### Developement
12
+
13
+Simply use the django command :
14
+
15
+    python manage.py runserver 0.0.0.0:8000
16
+
17
+### Production
18
+
19
+Install the packages needed to run an Apache server with `wsgi_mod` :
20
+
21
+    sudo apt-get install apache2 libapache2-mod-wsgi-py3
22
+
23
+Then add the following content to the file `/etc/apache2/sites-available/000-default.conf`, inside the `<VirtualHost>` tag :
24
+
25
+    Alias /static <path-to-project-folder>/static
26
+    <Directory <path-to-project-folder>/static>
27
+         Require all granted
28
+    </Directory>
29
+
30
+    <Directory <path-to-project-folder>/seum>
31
+        <Files wsgi.py>
32
+            Require all granted
33
+        </Files>
34
+    </Directory>
35
+
36
+    WSGIDaemonProcess seum python-path=<path-to-project-folder>:<path-to-project-folder>/<name-of-virtualenv>/lib/python3.5/site-packages
37
+    WSGIProcessGroup seum
38
+    WSGIScriptAlias / <path-to-project-folder>/seum/wsgi.py
39
+
40
+To give Apache the permission to serve the files, execute these three commands :
41
+
42
+    chmod 664 <path-to-project-folder>/db.sqlite3
43
+    sudo chown :www-data <path-to-project-folder>/db.sqlite3
44
+    sudo chown :www-data <path-to-project-folder>
45
+
46
+To launch or restart the server, simply run :
47
+
48
+    sudo service apache2 restart

+ 1 - 1
counter/templates/baseTemplate.html

@@ -7,7 +7,7 @@
7 7
 	<meta name="keywords" content="seum compteur" />
8 8
 	<meta name="description" content="Compteurs de seum" />
9 9
 	<link rel="shortcut icon" type="image/png" href="{{STATIC_URL}}/favicon.ico"/>
10
-	<title>Seum – {% block title %}{% endblock %}</title>
10
+	<title>SeumBook™ – {% block title %}{% endblock %}</title>
11 11
 
12 12
 	{# Load the tag library #} {% load bootstrap3 %} {# Load CSS and JavaScript #} {% bootstrap_css %} {% bootstrap_javascript %} {# Display django.contrib.messages as Bootstrap alerts #} {% bootstrap_messages %}
13 13