Improve the readme file

This commit is contained in:
Rodolphe Breard 2018-05-27 11:28:13 +02:00
parent 4da85ac991
commit 1558b0e6fd

View file

@ -14,19 +14,27 @@
git clone https://git.khaganat.net/Tycho/khaganat-web.git khaganat-web
cd khaganat-web
vim .env
pipenv --python 3 --update
pipenv --three --update
pipenv run ./manage.py migrate
pipenv run ./manage.py collectstatic
pipenv run ./manage.py compilemessages
pipenv run ./manage.py createsuperuser
```
Then configure your server as you like. One way to deploy is to use Nginx and uWSGI:
* [How to use Django with uWSGI](https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/uwsgi/)
* [Setting up Django and your web server with uWSGI and nginx](https://uwsgi-docs.readthedocs.io/en/latest/tutorials/Django_and_nginx.html)
You can get the virtualenv's path using `pipenv --venv`.
Do not forget to check the [deployment checklist](https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/).
## Environment variables
You can set the following variables in the `.env` file:
* `KHAGANAT_SECRET_KEY` (required): Django's secret key, keep it secret.
* `KHAGANAT_SECRET_KEY` (required): Django's secret key, keep it secret (tip: generate one using `openssl rand -base64 42`).
* `KHAGANAT_DEBUG`: Debug mode, default is false.
* `KHAGANAT_HOSTNAMES`: Allowed hostnames, coma separated.
* `KHAGANAT_LANGUAGE_CODE`: Language code, default is `fr`.