|
|
Install in your environment of choice:
|
|
|
Install the following dependencies in your environment of choice:
|
|
|
Examples below are given for a standard virtualenv/pip on ubuntu.
|
|
|
|
|
|
* git
|
... | ... | @@ -26,7 +26,7 @@ set max_map_count permanently |
|
|
|
|
|
* third party tools
|
|
|
|
|
|
$ sudo apt install pngcrush
|
|
|
$ sudo apt install netcat-traditional jpegoptim pngcrush
|
|
|
|
|
|
* clone the repo
|
|
|
|
... | ... | @@ -41,7 +41,7 @@ set max_map_count permanently |
|
|
$ source env/bin/activate
|
|
|
$ pip install -r app/requirements.txt
|
|
|
|
|
|
* The default settings needs to be override for devs
|
|
|
* The default settings needs to be override for devs, these local settings can include the configuration you choose for development purposes.
|
|
|
|
|
|
$ cp app/escriptorium/local_settings.py{.example,}
|
|
|
$ edit app/escriptorium/local_settings.py
|
... | ... | @@ -52,20 +52,26 @@ It is then recommended to set $DJANGO_SETTINGS_MODULE |
|
|
|
|
|
$ export $DJANGO_SETTINGS_MODULE escriptorium.local_settings
|
|
|
|
|
|
And use something like (direnv)[https://direnv.net/] or use a custom shell script that sets it to automate it.
|
|
|
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 $@
|
|
|
```
|
|
|
Then everytime you would be using `python manage.py [args]`, you can use `./manage.sh [args]` instead.
|
|
|
Then every time you would be using `python manage.py [args]`, you can use `./manage.sh [args]` instead.
|
|
|
|
|
|
Another option is to point the --settings option of the commands to the module.
|
|
|
Another option is to point the --settings option of the manage commands to the module.
|
|
|
|
|
|
$ python manage [command] --settings=escriptorium.local_settings
|
|
|
|
|
|
* change to the working directory
|
|
|
|
|
|
$ cd app
|
|
|
|
|
|
* To check your installation thus far run
|
|
|
|
|
|
$ python manage.py check
|
|
|
|
|
|
* To run a basic celery worker listening on everything (open a new terminal or use screen)
|
|
|
|
|
|
$ celery -A escriptorium worker -l INFO
|
... | ... | @@ -74,10 +80,14 @@ To disable celery completely, and process everything synchronously, you can set |
|
|
|
|
|
* Create the sql tables
|
|
|
|
|
|
$ python manage.py migrate # --settings=escriptorium.local_settings
|
|
|
$ python manage.py migrate
|
|
|
|
|
|
* Create a user
|
|
|
|
|
|
$ python manage.py createsuperuser
|
|
|
|
|
|
* Run the server
|
|
|
|
|
|
$ python manage.py runserver # --settings=escriptorium.local_settings
|
|
|
$ python manage.py runserver
|
|
|
|
|
|
The website should be accessible at http://localhost:8000/ |