Rather than using Docker, it is also possible to manually install the dependencies on your host machine or in a virtual machine. These dependencies include:
- python (2.7)
- python-pip
- nodejs (10.x)
- Postgres DB
- redis
- minio server
- nginx
- ffmpeg
- python-tk
- libmagickwand-dev
- yarn
You can also use nodeenv
(which is included as a python development dependency below) or nvm
to install Node.js 10.x if you need to maintain multiple versions of node:
You can install all the necessary packages using these commands (you may need to add sudo
if you receive Permission Denied
errors:
# Install minio
wget https://dl.minio.io/server/minio/release/linux-amd64/minio -O /usr/local/bin/minio
chmod +x /usr/local/bin/minio
# Install node PPA
curl -sL https://deb.nodesource.com/setup_10.x | bash -
# Install packages
apt-get install -y python python-pip python-dev python-tk \
postgresql-server-dev-all postgresql-contrib postgresql-client postgresql \
ffmpeg nodejs libmagickwand-dev nginx redis-server wkhtmltopdf
You can install the corresponding packages using Homebrew:
brew install [email protected] redis node ffmpeg imagemagick@6 gs
brew install minio/stable/minio
brew link --force [email protected]
brew link --force imagemagick@6
Windows is no longer supported due to incompatibilities with some of the required packages.
Install postgres if you don't have it already. If you're using a package manager, you need to make sure you install the following packages: postgresql
, postgresql-contrib
, and postgresql-server-dev-all
which will be required to build psycopg2
python driver.
Make sure postgres is running:
service postgresql start
# alternatively: pg_ctl -D /usr/local/var/[email protected] start
Start the client with:
sudo su postgres # switch to the postgres account
psql # mac: psql postgres
Create a database user with username learningequality
and password kolibri
:
CREATE USER learningequality with NOSUPERUSER INHERIT NOCREATEROLE CREATEDB LOGIN NOREPLICATION NOBYPASSRLS PASSWORD 'kolibri';
Create a database called kolibri-studio
:
CREATE DATABASE "kolibri-studio" WITH TEMPLATE = template0 ENCODING = "UTF8" OWNER = "learningequality";
Press Ctrl+D to exit the psql
client. Finally
exit # leave the postgres account
To start redis on Linux-based systems, run the following command
service redis-server start
On Mac, it will be started as part of the yarn run services
command (detailed below).
These commands setup the necessary tables and contents in the database.
In one terminal, run all external services:
yarn run services
In another terminal, run devsetup to create all the necessary tables and buckets:
yarn run devsetup
When this completes, close the second tab and kill the services.
You're all set up now, and ready to start the Studio local development server:
On Macs only run this in another terminal first:
yarn run services
Start the server:
yarn run devserver
Once you see the following output in your terminal, the server is ready:
Starting development server at http://0.0.0.0:8080/
Quit the server with CONTROL-C.
You should be able to login at http://127.0.0.1:8080 using email [email protected]
, password a
.
Note: If you are using a Linux environment, you may need to increase the amount of listeners to allow the watch
command to automatically rebuild static assets when you edit them. Please see here for instructions on how to do so.