Project

General

Profile

Django-hosting » History » Version 7

Nico Schottelius, 04/08/2016 11:27 AM

1 1 Nico Schottelius
h1. django-hosting.ch by ungleich
2
3
h2. How to use
4
5 5 Nico Schottelius
h3. Configure your app
6 2 Nico Schottelius
7 5 Nico Schottelius
* Create wsgi.py below your *app/wsgi.py* in your project root that returns the wsgi application
8 4 Nico Schottelius
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 5 Nico Schottelius
** Don't forget to run your migrations!
19 2 Nico Schottelius
* 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 7 Nico Schottelius
* uwsgi log: *tail -F /var/log/uwsgi/app/app.log*
31 6 Nico Schottelius
32 4 Nico Schottelius
33 1 Nico Schottelius
34
35
h2. Description of the stack
36
37
h3. Technologies
38
39
* Debian 8
40
* nginx
41
* PostgreSQL
42
* uwsgi
43 3 Nico Schottelius
44
h3. Configuration
45
46
* user "app"
47
** in group "adm" (to view logfiles)
48
* PostgreSQL with
49
** database "app"
50
** Listens only on localhost / socket (no remote connections)
51
**