-
Notifications
You must be signed in to change notification settings - Fork 3
Deployment
To deploy Opensoup in an production (or online testing) environment, you should do the following:
You should change the following in your settings (opensoup/settings.py):
Simply change DEBUG
(fifth line) to False
:
DEBUG = False
TEMPLATE_DEBUG = DEBUG
Change the ADMINS
array to the correct value for your installation:
ADMINS = (
('Herp Derp', '[email protected]'),
('Derpina Herpendorfer', '[email protected]'),
)
You should change the database backend from sqlite to something more reasonable for production (like PostgreSQL or MySQL etc.):
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2', # One of 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'opensoup',
'USER': 'opensoup',
'PASSWORD': 'lepassword',
'HOST': 'database.example.org',
'PORT': '', # Can be left empty for the default port
}
}
Remember, Opensoup won't deliver your staticfiles and assets anymore if DEBUG
is turned off, as that is only some hack to make local testing easier, but is way too slow to actually use it anywhere. Therefore, you should set MEDIA_ROOT and STATIC_ROOT to some directories to which your opensoup user can write. Then, you should configure a web server of your choice (lighttpd, nginx, apache, …) to serve those files from there to some URLs and then set these in the MEDIA_URL and STATIC_URL settings.
MEDIA_ROOT = '/srv/http/opensoup-media/'
MEDIA_URL = '//media.example.org/'
STATIC_ROOT = '/srv/http/opensoup-static/'
STATIC_URL = '//static.example.org/'
This one is really important! Make sure you change the SECRET_KEY
variable to some random letters of your choice.:
SECRET_KEY = 'Seriously, change me!'
Change SITE_URL
to the URL of your site (i.e. soup.io
).