... | ... | @@ -2,6 +2,7 @@ Install in your environment of choice: |
|
|
Examples below are given for a standard virtualenv/pip on ubuntu.
|
|
|
|
|
|
* postgresql, setup a user and create a database (default name is escriptorium)
|
|
|
|
|
|
$ sudo apt install postgresql postgresql-contrib
|
|
|
$ sudo -i -u postgres # switch to postgres user
|
|
|
$ createuser --interactive
|
... | ... | @@ -11,22 +12,27 @@ Examples below are given for a standard virtualenv/pip on ubuntu. |
|
|
$ createdb escriptorium
|
|
|
|
|
|
* redis
|
|
|
|
|
|
$ sudo apt-get install redis-server
|
|
|
|
|
|
<!--* elasticsearch
|
|
|
set max_map_count permanently
|
|
|
|
|
|
$ sudo sysctl -w vm.max_map_count=262144 -->
|
|
|
|
|
|
* third party tools
|
|
|
|
|
|
$ sudo apt-get install pngcrush
|
|
|
|
|
|
* env
|
|
|
|
|
|
$ apt-get install build-essential python-dev python3-dev
|
|
|
$ virtualenv env -p python3.7 (any version >= 3.7 should work)
|
|
|
$ . env/bin/activate
|
|
|
$ pip install -r app/requirements.txt
|
|
|
|
|
|
* The default settings needs to be override for devs
|
|
|
|
|
|
$ cp app/escriptorium/local_settings.py{.example,}
|
|
|
$ edit app/escriptorium/local_settings.py
|
|
|
|
... | ... | @@ -39,8 +45,8 @@ It is then recommended to set $DJANGO_SETTINGS_MODULE |
|
|
And use something like (direnv)[https://direnv.net/] or use a custom shell script that sets it to automate it.
|
|
|
```shell
|
|
|
#!/bin/bash
|
|
|
export DJANGO_SETTINGS_MODULE=escriptorium.local_settings
|
|
|
python manage.py $@
|
|
|
$ export DJANGO_SETTINGS_MODULE=escriptorium.local_settings
|
|
|
$ python manage.py $@
|
|
|
```
|
|
|
Then everytime you would be using `python manage.py [args]`, you can use `./manage.sh [args]` instead.
|
|
|
|
... | ... | |