forked from zazasa/TeaRoom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
HowToDeploy.txt
42 lines (32 loc) · 1.51 KB
/
HowToDeploy.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
How to deploy our Django project
================================
Requirements:
-------------
An Apache server with the wsgi module.
A folder where to put the site source.
Access to Apache, to mySQL, and to the file system.
Useful links:
-------------
1. http://www.djangobook.com/en/2.0/chapter12.html
2. https://docs.djangoproject.com/en/dev/ref/settings/#databases
3. https://github.com/joke2k/django-environ # search for "db_url"
4. https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/modwsgi/.
TODOs:
------
- Settings for production mode to be stored in TeaRoom/src/TeaRoom/settings/production.py and local.env
- syntax for database url in local.env: check link n. 3
- set EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' # and other info at https://docs.djangoproject.com/en/1.8/topics/email/#smtp-backend
- remove development.py
Do one of the following (I think the second):
- before running, do what written in settings.__init__, i.e.:
export DJANGO_SETTINGS_MODULE=TeaRoom.settings.production
- In TeaRoom/src/TeaRoom/wsgi.py at line 11, change TeaRoom.settings to TeaRoom.settings.production
- remove development.py and import production.py instead (from settings.__init__.py)
- in assignment_uploader.py, change URL.
Then:
- check if templates 404 and 500 exist / work; if not, create them.
- AoB????
- Ask Roland to change the permissions of local.env so that apache can use it, but nobody else has read access.
./manage.py flush
./manage.py makemigrations
./manage.py syncdb [ creating a superuser ]