-
Notifications
You must be signed in to change notification settings - Fork 16
Installation
K. Andrew Parker edited this page Sep 5, 2021
·
1 revision
mkdir volumes
mkdir container
git clone https://github.com/openwebwork/webwork-open-problem-library volumes/webwork-open-problem-library
git clone --recursive https://github.com/drdrew42/renderer container/
docker build --tag renderer:1.0 ./container
docker run -d \
--rm \
--name standalone-renderer \
--publish 3000:3000 \
--mount type=bind,source="$(pwd)"/volumes/webwork-open-problem-library/,target=/usr/app/webwork-open-problem-library \
--env MOJO_MODE=development \
renderer:1.0
If you have non-OPL content, it can be mounted as a volume at /usr/app/private
by adding the following line to the docker run
command:
--mount type=bind,source=/pathToYourLocalContentRoot,target=/usr/app/private \
A default configuration file is included in the container, but it can be overridden by mounting a replacement at the application root.
--mount type=bind,source=/pathToYour/configuration_file.conf,target=/usr/app/render_app.conf \
If using a local install instead of docker:
- Clone the renderer and its submodules:
git clone --recursive https://github.com/drdrew42/renderer
- Enter the project directory:
cd renderer
- Install perl dependencies listed in Dockerfile (CPANMinus recommended)
- clone webwork-open-problem-library into the provided stub ./webwork-open-problem-library
git clone https://github.com/openwebwork/webwork-open-problem-library ./webwork-open-problem-library
- copy
render_app.conf.dist
torender_app.conf
and make any desired modifications - install other dependencies
cd lib/WeBWorK/htdocs
npm install
- start the app with
morbo ./script/render_app
ormorbo -l http://localhost:3000 ./script/render_app
if changing root url - access on
localhost:3000
by default or otherwise specified root url
At times, it may be necessary to re-initialize the PG submodule from openwebwork:
git submodule deinit lib/PG
git submodule update --init lib/PG