-
Notifications
You must be signed in to change notification settings - Fork 2
Install
Clone the source code:
git clone git@github.com:learningtapestry/unbounded-lcms.git
Install required gems:
cd unbounded-lcms
gem install bundler && bundler
Create files with environment variables:
cp .env.template .env.development
cp .env.template .env.test
Template file contains minimum set of predefined variables for application to run. Update variables
POSTGRESQL_*
if you have created database with different name. Don't forget to change the database name in the .env.test
template.
You can find the full list of supported variables here.
Export variables:
source .env.development
Create database user:
psql postgres -c "create user ${POSTGRESQL_USERNAME} with password '${POSTGRESQL_PASSWORD}' createdb;"
Restore the database from the pre-populated UnboundEd template:
cp db/dump/content.dump.freeze db/dump/content.dump
bundle exec rake db:restore
bundle exec rake db:migrate
After that there will be single user with admin
role, email admin@example.org
, password: password
. For security
reasons we recommend you add a new admin user to the production environment and delete this one once the project is
running.
Run the following task to setup your index and import the data into ES (make sure ElasticSearch is running):
bundle exec rake es:load
If you are using an empty database you will need at least the curriculum tree root nodes (subjects
). Load them via:
bundle exec rake db:seed:lcms
Install required fonts:
apt-get install fontconfig -y
cp -R app/assets/fonts/* /usr/local/share/fonts
fc-cache -f -v
For macOS:
cp -R app/assets/fonts/* ~/Library/Fonts
npm install mathjax-node
npm install mathjax-node-cli
npm install svgexport
npm install pngquant-bin
wget https://downloads.wkhtmltopdf.org/0.12/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
tar xvfJ wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
cp wkhtmltox/bin/wkhtmltopdf /usr/local/bin
For macOS you can download the package from the website