|
|
Install the following dependencies in your environment of choice:
|
|
|
Examples below are given for a standard virtualenv/pip on ubuntu [18].
|
|
|
|
|
|
* git
|
|
|
* Install git
|
|
|
|
|
|
$ sudo apt install git
|
|
|
|
|
|
* postgresql, setup a user and create a database (default name is escriptorium)
|
|
|
* Install 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
|
... | ... | @@ -15,7 +15,7 @@ Examples below are given for a standard virtualenv/pip on ubuntu [18]. |
|
|
$ exit # logout from postgres user
|
|
|
$ createdb escriptorium
|
|
|
|
|
|
* redis
|
|
|
* Install redis
|
|
|
|
|
|
$ sudo apt install redis-server
|
|
|
|
... | ... | @@ -24,16 +24,16 @@ set max_map_count permanently |
|
|
|
|
|
$ sudo sysctl -w vm.max_map_count=262144 -->
|
|
|
|
|
|
* third party tools
|
|
|
* Install third party tools
|
|
|
|
|
|
$ sudo apt install netcat-traditional jpegoptim pngcrush
|
|
|
|
|
|
* clone the repo
|
|
|
* Clone the repo
|
|
|
|
|
|
$ git clone git@gitlab.inria.fr:scripta/escriptorium.git
|
|
|
$ cd escriptorium
|
|
|
|
|
|
* env - using virtualenv here but any env manager should work
|
|
|
* Create a virtual environment - using virtualenv here but any env manager should work
|
|
|
|
|
|
$ sudo apt install build-essential python3.7 python-dev python3.7-dev python3-venv python3-pip # depends on distro/os a lot
|
|
|
$ pip3 install virtualenv
|
... | ... | @@ -64,7 +64,7 @@ Another option is to point the --settings option of the manage commands to the m |
|
|
|
|
|
$ python manage [command] --settings=escriptorium.local_settings
|
|
|
|
|
|
* change to the working directory
|
|
|
* Change to the working directory
|
|
|
|
|
|
$ cd app
|
|
|
|
... | ... | @@ -72,36 +72,36 @@ Another option is to point the --settings option of the manage commands to the m |
|
|
|
|
|
$ python manage.py check
|
|
|
|
|
|
* To run a basic celery worker listening on everything (open a new terminal or use screen)
|
|
|
* Run a basic celery worker listening on everything (open a new terminal or use screen)
|
|
|
|
|
|
$ celery -A escriptorium worker -l INFO
|
|
|
|
|
|
To disable celery completely, and process everything synchronously, you can set `CELERY_TASK_ALWAYS_EAGER = True`
|
|
|
|
|
|
|
|
|
* To install `npm` dependencies (run once)
|
|
|
* Install `npm` dependencies (run once)
|
|
|
|
|
|
$ cd front
|
|
|
$ npm install
|
|
|
|
|
|
Then, you can choose one of the following build to serve JS dependencies and the Vue application code.
|
|
|
|
|
|
* To generate a single JS build in development mode, it will enable warnings/errors display in the browser console
|
|
|
* Either generate a single JS build in development mode, it will enable warnings/errors display in the browser console
|
|
|
|
|
|
$ cd front
|
|
|
$ npm run build
|
|
|
|
|
|
* To generate a continuous JS build using the `--watch` option and in development mode, it will enable warnings/errors display in the browser console
|
|
|
* Or generate a continuous JS build using the `--watch` option and in development mode, it will enable warnings/errors display in the browser console
|
|
|
|
|
|
$ cd front
|
|
|
$ npm run start
|
|
|
|
|
|
* To generate an optimized production build
|
|
|
* Or generate an optimized production build
|
|
|
|
|
|
$ cd front
|
|
|
$ npm run production
|
|
|
|
|
|
|
|
|
To disable celery completely, and process everything synchronously, you can set `CELERY_TASK_ALWAYS_EAGER = True`
|
|
|
|
|
|
* Create the sql tables
|
|
|
|
|
|
$ python manage.py migrate
|
... | ... | |