Bläddra i källkod

update readme

Guénaël Muller 6 år sedan
förälder
incheckning
1b97d7976e
2 ändrade filer med 99 tillägg och 20 borttagningar
  1. 23 12
      README.md
  2. 76 8
      backend/doc/setting.md

+ 23 - 12
README.md Visa fil

@@ -1,8 +1,9 @@
1
-develop branch status:
1
+develop branch status :
2 2
 [![Build Status](https://travis-ci.org/tracim/tracim_v2.svg?branch=develop)](https://travis-ci.org/tracim/tracim_v2)
3 3
 [![Coverage Status](https://coveralls.io/repos/github/tracim/tracim_v2/badge.svg?branch=develop)](https://coveralls.io/github/tracim/tracim_v2?branch=develop)
4 4
 [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/tracim/tracim_v2/badges/quality-score.png?b=develop)](https://scrutinizer-ci.com/g/tracim/tracim_v2/?branch=develop)
5 5
 
6
+
6 7
 ## Install Tracim on your server ##
7 8
 
8 9
 Following the installation documentation below, you'll be able to run your own instance on your server.
@@ -13,30 +14,40 @@ Following the installation documentation below, you'll be able to run your own i
13 14
 
14 15
 ## Get the source ##
15 16
 
16
-Get the sources from GitHub:
17
+Get the sources from GitHub (you need git):
17 18
 
18 19
     git clone https://github.com/tracim/tracim_v2.git
19 20
     cd tracim_v2/
20 21
 
21
-## Install backend ##
22
+## Install backend
23
+### Option 1: Install backend manually ###
24
+
25
+see [Backend README](backend/README.md)
26
+
27
+### Option2: Install backend: Automated script for easy setup ###
28
+
29
+This script run backend with simple default conf: development.ini conf file, use
30
+default config file, sqlite database, etc...
22 31
 
23 32
     ./setup_default_backend.sh
24 33
 
25
-For debugging you can uncomment this 2 lines in '/backend/development.ini'
26
-    
27
-    ~~~
28
-    #pyramid.includes =
29
-    #    pyramid_debugtoolbar
30
-    ~~~
34
+For each conf file missing, this script will generated them from default conf.
35
+If sqlite default database is missing, script will generate it.
36
+This script is also able to serve for update. If you want to update a script
37
+generated tracim install, you can just update source code with git pull and
38
+rerun the same script to update database model, system deps and python deps.
39
+
40
+for more information about configuring tracim_backend, see [Backend README](backend/README.md)
41
+for more information about configuration file, see development.ini.sample documentation
42
+and [Backend setting file doc](backend/doc/setting.md).
31 43
 
32
-If you use debugtoolbar, you can seen one red button on right of the Tracim web interface.
33 44
 
34
-## Install frontend ##
45
+## Install frontend : Automated Script for easy setup ##
35 46
 
36 47
     ./install_frontend_dependencies.sh
37 48
     ./build_full_frontend.sh
38 49
 
39
-## Running Tracim  ##
50
+## Running Tracim using pserve ##
40 51
 
41 52
     cd backend/
42 53
     source env/bin/activate

+ 76 - 8
backend/doc/setting.md Visa fil

@@ -1,8 +1,13 @@
1
-# Setting #
1
+# Settings #
2 2
 
3
-Here is a short description of settings available in the file `development.ini`.
3
+Here is a short description of settings available in backend config files.
4 4
 
5
-## Listening port ##
5
+# Tracim config ini file #
6
+
7
+This file is called'development.ini' file by default, it's located is backend
8
+subdir, default config is [development.ini.sample](../development.ini.sample) with some doc.
9
+
10
+## Listening port (for pserve only) ##
6 11
 
7 12
 Default configuration is to listen on port 6534.
8 13
 If you want to adapt this to your environment, edit the `.ini` file and setup the port you want:
@@ -17,30 +22,93 @@ To allow other computer to access to this website, listen to "*" instead of loca
17 22
     ...
18 23
     listen = *:6534
19 24
 
20
-## Prod/Debug configuration ##
25
+## Database path ##
26
+
27
+To configure a database, you need to provide a valid sqlalchemy url:
28
+
29
+for sqlite, a valid value is something like this:
30
+
31
+    sqlalchemy.url = sqlite:///%(here)s/tracim.sqlite
32
+
33
+to know more about this, see [sqlalchemy documentation](http://docs.sqlalchemy.org/en/latest/core/engines.html).
34
+
35
+Be carefull, if sqlalchemy support many kind of Database, Tracim support is **not** guarantee.
36
+Tracim is officially supporting sqlite, postgresql and mysql.
37
+
38
+## Debugging and Logs ##
39
+### Debug params ###
40
+
41
+
42
+For debugging you can uncomment this 2 lines in '/backend/development.ini' to
43
+enable pyramid debugtoolbar.
44
+If you use debugtoolbar, you can seen one red button on right of the Tracim web interface.
45
+
46
+    ~~~
47
+    #pyramid.includes =
48
+    #    pyramid_debugtoolbar
49
+    ~~~
50
+
51
+you can add this line to active pyramid debug mode for almost anything:
52
+
53
+    ~~~
54
+    pyramid.debug_all = true
55
+    ~~~
56
+
57
+
58
+Hapic debug mode : this line is needed for more explicit json error,
59
+raised error traceback will be send through json. you can uncomment it
60
+
61
+   ~~~
62
+   # debug = True
63
+   ~~~
64
+
65
+pyramid.reload_templates = true
66
+
67
+### Prod/Debug configuration example ###
21 68
 
22 69
 
23 70
 To enable simple debug conf:
24 71
 
25
-    [app:main]
72
+    [app:tracim_web]
26 73
     ...
27 74
     pyramid.reload_templates = true
28 75
     pyramid.debug_all = true
29 76
     pyramid.includes =
30 77
         pyramid_debugtoolbar
31 78
 
79
+    [DEFAULT]
80
+    ...
81
+    debug = True
82
+
83
+
32 84
 production conf (no reload, no debugtoolbar):
33 85
 
34
-    [app:main]
86
+    [app:tracim_web]
35 87
     ...
36 88
     pyramid.reload_templates = false
37 89
     pyramid.debug_authorization = false
38 90
     pyramid.debug_notfound = false
39 91
     pyramid.debug_routematch = false
40 92
 
41
-You can, of course, also set level of one of the different logger to have more/less log
42
-about something.
93
+    [DEFAULT]
94
+    ...
95
+    debug = False
96
+
97
+You can, of course, also set level of one of the different logger
98
+to have more/less log about something.
43 99
 
44 100
     [logger_sqlalchemy]
45 101
     ...
46 102
     level = INFO
103
+
104
+# Color File #
105
+
106
+You can change default color of apps by setting color.json file, by default,
107
+placed at root of tracim_v2 dir, see [color.json.sample](../../color.json.sample)
108
+for default config file.
109
+
110
+# Wsgidav File
111
+
112
+This file is by default placed in backend subdir,
113
+it by default called wsigdav.conf, for more information, see default
114
+conf file [wsigdav.conf.sample](../wsgidav.conf.sample).