Project

General

Profile

Django-hosting » History » Version 5

Nico Schottelius, 04/08/2016 11:14 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
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
**