summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--INSTALL.md15
-rw-r--r--conf/nginx.conf.template4
-rw-r--r--conf/uwsgi.ini.template2
-rw-r--r--pergamon/settings/local.py.sample7
4 files changed, 21 insertions, 7 deletions
diff --git a/INSTALL.md b/INSTALL.md
index 886e45d..3cd757f 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -21,18 +21,25 @@ virtualenv --system-site-packages $VENV_PATH/pergamon
pip install -r $SRV_PATH/ishtar-pergamon/requirements.txt
cd $SRV_PATH/ishtar-pergamon
-# initialize the DB and the static files
+# initialize DB, static files, translations...
+cp pergamon/settings/local.py.sample pergamon/settings/local.py
+vim pergamon/settings/local.py # at least set a SECRET_KEY, BASE_URL and ALLOWED_HOSTS
+
+chown -R www-data:www-data media
cp Makefile.example Makefile
make collectstatic
make migrate
-chown -R www-data:www-data media
+make compilemessages
+./manage.py createsuperuser
+# webserver configuration
cp conf/nginx.conf.template /etc/nginx/sites-available/pergamon.conf
-vim /etc/nginx/sites-available/pergamon.conf
+vim /etc/nginx/sites-available/pergamon.conf # change at least server name
ln -s /etc/nginx/sites-available/pergamon.conf /etc/nginx/sites-enabled/pergamon.conf
cp conf/uwsgi.ini.template /etc/uwsgi/apps-available/pergamon.ini
-vim /etc/uwsgi/apps-available/pergamon.ini
+vim /etc/uwsgi/apps-available/pergamon.ini # change at least projectdomain
ln -s /etc/uwsgi/apps-available/pergamon.ini /etc/uwsgi/apps-enabled/pergamon.ini
+systemctl restart uwsgi nginx
```
diff --git a/conf/nginx.conf.template b/conf/nginx.conf.template
index 785bc57..923e14e 100644
--- a/conf/nginx.conf.template
+++ b/conf/nginx.conf.template
@@ -14,7 +14,7 @@ server {
gzip_types text/plain text/css text/js text/xml text/javascript application/javascript application/x-javascript application/json application/xml application/rss+xml image/svg+xml;
location /static/ { # STATIC_URL
- alias /srv/ishtar-pergamon/static/; # STATIC_ROOT
+ alias /srv/ishtar-pergamon/collected_static/; # STATIC_ROOT
expires 30d;
}
@@ -25,7 +25,7 @@ server {
location / {
include uwsgi_params;
- uwsgi_pass unix:/var/lib/uwsgi/run/ishtar_pergamon.sock;
+ uwsgi_pass unix:/var/lib/uwsgi/run/pergamon.sock;
uwsgi_read_timeout 1800;
uwsgi_send_timeout 600;
}
diff --git a/conf/uwsgi.ini.template b/conf/uwsgi.ini.template
index 09ee6b7..1287179 100644
--- a/conf/uwsgi.ini.template
+++ b/conf/uwsgi.ini.template
@@ -9,7 +9,7 @@ home = /srv/venv/pergamon/
plugins = python
master = true
protocol = uwsgi
-env = DJANGO_SETTINGS_MODULE=%(projectname).settings
+env = DJANGO_SETTINGS_MODULE=%(projectname).settings.production
pythonpath = %(base)
module = %(projectname).wsgi
socket = /var/lib/uwsgi/run/%(projectname).sock
diff --git a/pergamon/settings/local.py.sample b/pergamon/settings/local.py.sample
index 512145b..f595369 100644
--- a/pergamon/settings/local.py.sample
+++ b/pergamon/settings/local.py.sample
@@ -1 +1,8 @@
EXTRA_APP = "" # add your own extra app
+
+LANGUAGE_CODE = "fr-fr"
+
+SECRET_KEY = "" # put a random string
+BASE_URL = "" # put the website url (with http)
+
+ALLOWED_HOSTS = [] # put used domains (no http)