소스 검색

Merge branch 'master' of github.com:tracim/tracim

Skylsmoi 7 년 전
부모
커밋
7811cf7ccc
3개의 변경된 파일119개의 추가작업 그리고 17개의 파일을 삭제
  1. 6 0
      README.md
  2. 101 0
      doc/nginx.md
  3. 12 17
      tracim/tracim/templates/workspace/getone.mak

+ 6 - 0
README.md 파일 보기

@@ -98,6 +98,12 @@ The easiest way to test Tracim is to test it through the online demo:
98 98
 
99 99
 If you want your own dedicated instance but do not want to manage it by yourself, let's contact me at damien.accorsi@free.fr
100 100
 
101
+## Docker ##
102
+
103
+In case you prefer using Docker:
104
+
105
+    docker run -e DATABASE_TYPE=sqlite -p 80:80 -v /var/tracim/etc:/etc/tracim -v /var/tracim/var:/var/tracim algoo/tracim
106
+
101 107
 ## Install Tracim on your server ##
102 108
 
103 109
 Following the installation documentation below, you'll be able to run your own instance on your server.

+ 101 - 0
doc/nginx.md 파일 보기

@@ -0,0 +1,101 @@
1
+# Running Tracim through nginx #
2
+
3
+### Installation ###
4
+
5
+Install `nginx` http server and `uWSGI` app server:
6
+
7
+    sudo apt install nginx uwsgi uwsgi-plugin-python3
8
+
9
+### Configuration ###
10
+
11
+In the following documentation, please replace:
12
+
13
+- `[tracim_path]` by  your tracim installation path,
14
+- `[your_user]` by your user.
15
+
16
+Set the `APP_CONFIG` variable of the `tracim/app.wsgi` file to match your tracim installation path:
17
+
18
+    # -*- coding: utf-8 -*-
19
+
20
+    APP_CONFIG = "[tracim_path]/tracim/development.ini"
21
+
22
+    #Setup logging
23
+    # import logging
24
+    # logging.config.fileConfig(APP_CONFIG)
25
+
26
+    #Load the application
27
+    from paste.deploy import loadapp
28
+    application = loadapp('config:%s' % APP_CONFIG)
29
+    application.debug = False
30
+
31
+Create the file named `/etc/uwsgi/apps-available/tracim_uwsgi.ini` containing:
32
+
33
+    [uwsgi]
34
+    plugins = python3
35
+    chdir = [tracim]/tracim
36
+    home = [tracim]/tg2env
37
+    wsgi-file = app.wsgi
38
+    callable = application
39
+    # socket = /var/run/uwsgi/app/tracim/socket
40
+    socket = :8001
41
+    enable-threads = true
42
+    uid = [your_user]
43
+    gid = [your_user]
44
+
45
+Create a file named `/etc/nginx/sites-available/tracim_nginx.conf` containing:
46
+
47
+    server {
48
+        listen      8080;
49
+        server_name tracim;
50
+        charset     utf-8;
51
+
52
+        client_max_body_size 75M;
53
+
54
+        location /caldav {
55
+            proxy_pass http://127.0.0.1:10000;
56
+            proxy_set_header Host $http_host;
57
+        }
58
+
59
+        location /webdav {
60
+            proxy_pass http://127.0.0.1:3031;
61
+            proxy_set_header Host $http_host;
62
+        }
63
+
64
+        location /favicon.ico {
65
+            alias [tracim_path]/tracim/tracim/public/favicon.ico
66
+        }
67
+
68
+        location /assets {
69
+            root [tracim_path]/tracim/tracim/public/assets;
70
+            try_files $uri @default_assets;
71
+        }
72
+
73
+        location @default_assets {
74
+            root [tracim_path]/tracim/tracim/public/;
75
+        }
76
+
77
+        location / {
78
+            # uwsgi_pass  unix:/var/run/uwsgi/app/tracim/socket;
79
+            uwsgi_pass  127.0.0.1:8001;
80
+            include uwsgi_params;
81
+            uwsgi_param  SCRIPT_NAME  '';
82
+        }
83
+    }
84
+
85
+Enable this site configuration file:
86
+
87
+    sudo ln -s /etc/nginx/sites-available/tracim_nginx.conf /etc/nginx/sites-enabled/
88
+
89
+Reload `nginx` configuration:
90
+
91
+    sudo systemctl reload nginx.service
92
+
93
+Run uWSGI, by example with the following command:
94
+
95
+    uwsgi --ini /etc/uwsgi/apps-available/tracim_uwsgi.ini
96
+
97
+Tracim should be available in your browser at `127.0.0.1:8080`.
98
+
99
+## Documentation Links ##
100
+
101
+[uWSGI](http://uwsgi-docs.readthedocs.io/en/latest/tutorials/Django_and_nginx.html)

+ 12 - 17
tracim/tracim/templates/workspace/getone.mak 파일 보기

@@ -193,23 +193,18 @@
193 193
                     % endif
194 194
                 </div>
195 195
                 <div class="col-md-8 text-right">
196
-                    % if len(fake_api.sub_items) > 0:
197
-                        ## INFO - D.A. - 2015-05-25
198
-                        ## We hide filtering/search buttons if no content yet.
199
-                        ## This make the interface more easy to use
200
-                        <div class="btn-group" role="group" aria-label="...">
201
-                            ${BUTTON.TEXT('', 'btn btn-default disabled', _('hide...'))}
202
-                            % for content_type in result.workspace.allowed_content_types:
203
-                                ${BUTTON.TEXT('toggle-{type}-visibility'.format(type=content_type.id), 'btn btn-default t-active-color disabled-has-priority', content_type.label)}
204
-                            % endfor
205
-                        </div>
206
-                        <p></p>
207
-                        ${UI.GENERIC_DISPLAY_VIEW_BUTTONS_CONTAINER(tg.url('/workspaces/{}'.format(result.workspace.id)))}
208
-                        <p></p>
209
-                        <div class="btn-group pull-right" role="group" aria-label="...">
210
-                            <input id="filtering"  type="text" class="form-control t-bg-grey" placeholder="${_('filter...')}" aria-describedby="basic-addon1">
211
-                        </div>
212
-                    % endif
196
+                    <div class="btn-group" role="group" aria-label="...">
197
+                        ${BUTTON.TEXT('', 'btn btn-default disabled', _('hide...'))}
198
+                        % for content_type in result.workspace.allowed_content_types:
199
+                            ${BUTTON.TEXT('toggle-{type}-visibility'.format(type=content_type.id), 'btn btn-default t-active-color disabled-has-priority', content_type.label)}
200
+                        % endfor
201
+                    </div>
202
+                    <p></p>
203
+                    ${UI.GENERIC_DISPLAY_VIEW_BUTTONS_CONTAINER(tg.url('/workspaces/{}'.format(result.workspace.id)))}
204
+                    <p></p>
205
+                    <div class="btn-group pull-right" role="group" aria-label="...">
206
+                        <input id="filtering"  type="text" class="form-control t-bg-grey" placeholder="${_('filter...')}" aria-describedby="basic-addon1">
207
+                    </div>
213 208
                 </div>
214 209
 
215 210