Project

General

Profile

Django-hosting » History » Version 4

Nico Schottelius, 04/08/2016 10:58 AM

1 1 Nico Schottelius
h1. django-hosting.ch by ungleich
2
3
h2. How to use
4
5 4 Nico Schottelius
h3. Prepare your app
6 2 Nico Schottelius
7 4 Nico Schottelius
* Create wsgi.py below *app/wsgi.py* in your project root that returns the wsgi application
8
9
10
11
h3. Deploy
12
13 2 Nico Schottelius
* Deploy / update your app into the folder *~app/app* (that is the app folder in the home of the user app)
14
** We recommended to use git to deploy it
15 4 Nico Schottelius
16
17 1 Nico Schottelius
* Use the database "app" (running on localhost, no password required)
18 2 Nico Schottelius
** Don't forget to run your migrations! 
19
* Restart uwsgi to load the new code of your app
20 3 Nico Schottelius
21 2 Nico Schottelius
h3. Restarting the app
22
23
* *sudo systemctl restart uwsgi*
24
25
26
h3. Viewing logfiles
27 1 Nico Schottelius
28 4 Nico Schottelius
* nginx access log: *tail -F /var/log/nginx/access.log*
29
* nginx error log: *tail -F /var/log/nginx/error.log*
30
31 1 Nico Schottelius
32
33
h2. Description of the stack
34
35
h3. Technologies
36
37
* Debian 8
38
* nginx
39
* PostgreSQL
40
* uwsgi
41 3 Nico Schottelius
42
h3. Configuration
43
44
* user "app"
45
** in group "adm" (to view logfiles)
46
* PostgreSQL with
47
** database "app"
48
** Listens only on localhost / socket (no remote connections)
49
**