1
1
# WeBWorK Standalone Problem Renderer & Editor
2
2
3
- ![ Commit Activity] ( https://img.shields.io/github/commit-activity/m/drdrew42 /renderer?style=plastic )
4
- ![ License] ( https://img.shields.io/github/license/drdrew42 /renderer?style=plastic )
3
+ ![ Commit Activity] ( https://img.shields.io/github/commit-activity/m/openwebwork /renderer?style=plastic )
4
+ ![ License] ( https://img.shields.io/github/license/openwebwork /renderer?style=plastic )
5
5
6
6
7
7
This is a PG Renderer derived from the WeBWorK2 codebase
@@ -13,42 +13,58 @@ This is a PG Renderer derived from the WeBWorK2 codebase
13
13
mkdir volumes
14
14
mkdir container
15
15
git clone https://github.com/openwebwork/webwork-open-problem-library volumes/webwork-open-problem-library
16
- git clone --recursive https://github.com/drdrew42/renderer container/
17
- docker build --tag renderer:1.0 ./container
18
-
19
- docker run -d \
20
- --rm \
21
- --name standalone-renderer \
22
- --publish 3000:3000 \
23
- --mount type=bind,source="$(pwd)"/volumes/webwork-open-problem-library/,target=/usr/app/webwork-open-problem-library \
24
- --env MOJO_MODE=development \
25
- renderer:1.0
26
- ```
16
+ git clone --recursive https://github.com/openwebwork/renderer container/
27
17
28
- 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:
18
+ cd container
19
+ docker build --no-cache --tag renderer-base:latest -f DockerfileStage1 .
20
+
21
+ # If you have a local version of docker-compose.yml you should update it
22
+ # as necessary before running the next line. If not, copy the
23
+ # docker-compose.yml.dist to docker-compose.yml and edit as necessary.
24
+
25
+ docker-compose build --no-cache
26
+
27
+ # You now set the MOJO_MODE and mount locations in docker-compose.yml
28
+ # instead of in the docker run command
29
+
30
+ docker-compose up -d
29
31
30
- ```
31
- --mount type=bind,source=/pathToYourLocalContentRoot,target=/usr/app/private \
32
32
```
33
33
34
- A default configuration file is included in the container, but it can be overridden by mounting a replacement at the application root. This is necessary if, for example, you want to run the container in ` production ` mode.
34
+ To stop the container run:
35
+ ```
36
+ docker-compose down
37
+ ```
35
38
39
+ If you need to rebuild the container, but do not need to change the
40
+ packages/installs in the stage 1 build, it suffices to:
36
41
```
37
- --mount type=bind,source=/pathToYour/render_app.conf,target=/usr/app/render_app.conf \
42
+ cd container
43
+ docker-compose build --no-cache
38
44
```
39
45
46
+ If you have non-OPL content, it can be mounted as a volume at ` /usr/app/private ` by
47
+ setting the relevant mount moint in ` docker-compose.yml ` so that it gets mounted under
48
+ ` /usr/app/private ` .
49
+
50
+ A default ` render_app.conf ` configuration file is included in the container,
51
+ but it can be overridden by mounting a replacement at the application root
52
+ using ` docker-compose.yml ` . This is necessary if, for example, you want to run
53
+ the container in ` production ` mode.
54
+
40
55
## LOCAL INSTALL ###
41
56
42
57
If using a local install instead of docker:
43
58
44
- * Clone the renderer and its submodules: ` git clone --recursive https://github.com/drdrew42 /renderer `
59
+ * Clone the renderer and its submodules: ` git clone --recursive https://github.com/openwebwork /renderer `
45
60
* Enter the project directory: ` cd renderer `
46
61
* Install perl dependencies listed in Dockerfile (CPANMinus recommended)
47
62
* clone webwork-open-problem-library into the provided stub ./webwork-open-problem-library
48
63
- ` git clone https://github.com/openwebwork/webwork-open-problem-library ./webwork-open-problem-library `
49
64
* copy ` render_app.conf.dist ` to ` render_app.conf ` and make any desired modifications
50
65
* install other dependencies
51
- - ` cd lib/WeBWorK/htdocs `
66
+ - ` npm install `
67
+ - ` cd lib/PG/htdocs `
52
68
- ` npm install `
53
69
* start the app with ` morbo ./script/render_app ` or ` morbo -l http://localhost:3000 ./script/render_app ` if changing root url
54
70
* access on ` localhost:3000 ` by default or otherwise specified root url
0 commit comments