diff options
author | Étienne Loks <etienne@peacefrogs.net> | 2019-08-27 13:44:08 +0200 |
---|---|---|
committer | Étienne Loks <etienne@peacefrogs.net> | 2019-08-27 13:44:08 +0200 |
commit | c384df96808d7783e1d1312a68f6c265bf1a4c75 (patch) | |
tree | ac6ad1a6b20ffffdcb75b6c961f6d230cf92b0f8 | |
parent | 7f9d36892be1da433cd20ff17caa0487a7e6179b (diff) | |
download | ishtar-pergamon-c384df96808d7783e1d1312a68f6c265bf1a4c75.tar.bz2 ishtar-pergamon-c384df96808d7783e1d1312a68f6c265bf1a4c75.zip |
Installation: complete instruction - fix conf files and settings
-rw-r--r-- | INSTALL.md | 15 | ||||
-rw-r--r-- | conf/nginx.conf.template | 4 | ||||
-rw-r--r-- | conf/uwsgi.ini.template | 2 | ||||
-rw-r--r-- | pergamon/settings/local.py.sample | 7 |
4 files changed, 21 insertions, 7 deletions
@@ -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) |