forked from openwebwork/webwork2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
https://github.com/taniwallach/ww_docker_config_sets/tree/master/WW-2.14-ubuntu_16.04 which overcome several issues: * docker-compose.yml: MariaDB on Dockers CE for Windows cannot function with bind mounted /var/lib/mysql at least with the default settings. Using a named volume for the persistent storage instead. * Dockerfile: Hardwired the PG branch (@mgage) and merge ENV lines (@nmoller), and additional reorganization * docker-entrypoint.sh: Create modelCourse directory and automatically run OPL-update on initial container startup, misc additional start-up time actions (@taniwallach) * Add some additional files to .dockerignore * PG_VERSION as a file, to match what the Dockerfile uses, so that the symbolic link cannot cause trouble/confusion in Docker installs.
- Loading branch information
1 parent
cb8b87d
commit afa47dd
Showing
5 changed files
with
86 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
Dockerfile | ||
logs/* | ||
tmp/* | ||
htdocs/tmp/* | ||
htdocs/DATA/library*.json | ||
htdocs/DATA/tagging-taxonomy.json | ||
htdocs/DATA/textbooks-tree.json | ||
.git | ||
.data | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,31 @@ | ||
FROM ubuntu:16.04 | ||
|
||
ENV WEBWORK_URL /webwork2 | ||
ENV WEBWORK_ROOT_URL http://localhost | ||
ENV WEBWORK_DB_HOST db | ||
ENV WEBWORK_DB_PORT 3306 | ||
ENV WEBWORK_DB_NAME webwork | ||
ENV WEBWORK_DB_DSN DBI:mysql:${WEBWORK_DB_NAME}:${WEBWORK_DB_HOST}:${WEBWORK_DB_PORT} | ||
ENV WEBWORK_DB_USER webworkWrite | ||
ENV WEBWORK_DB_PASSWORD passwordRW | ||
ENV WEBWORK_SMTP_SERVER localhost | ||
ENV WEBWORK_SMTP_SENDER [email protected] | ||
ENV WEBWORK_TIMEZONE America/New_York | ||
ENV APACHE_RUN_USER www-data | ||
ENV APACHE_RUN_GROUP www-data | ||
# temporary state file location. This might be changed to /run in Wheezy+1 | ||
ENV APACHE_PID_FILE /var/run/apache2/apache2.pid | ||
ENV APACHE_RUN_DIR /var/run/apache2 | ||
ENV APACHE_LOCK_DIR /var/lock/apache2 | ||
# Only /var/log/apache2 is handled by /etc/logrotate.d/apache2. | ||
ENV APACHE_LOG_DIR /var/log/apache2 | ||
ENV APP_ROOT /opt/webwork | ||
ENV WEBWORK_ROOT $APP_ROOT/webwork2 | ||
ENV PG_ROOT $APP_ROOT/pg | ||
ENV DEV 0 | ||
|
||
ENV PG_BRANCH=rel-PG-2.14 \ | ||
WEBWORK_URL=/webwork2 \ | ||
WEBWORK_ROOT_URL=http://localhost \ | ||
WEBWORK_DB_HOST=db \ | ||
WEBWORK_DB_PORT=3306 \ | ||
WEBWORK_DB_NAME=webwork \ | ||
WEBWORK_DB_USER=webworkWrite \ | ||
WEBWORK_DB_PASSWORD=passwordRW \ | ||
WEBWORK_SMTP_SERVER=localhost \ | ||
[email protected] \ | ||
WEBWORK_TIMEZONE=America/New_York \ | ||
APACHE_RUN_USER=www-data \ | ||
APACHE_RUN_GROUP=www-data \ | ||
# temporary state file location. This might be changed to /run in Wheezy+1 \ | ||
APACHE_PID_FILE=/var/run/apache2/apache2.pid \ | ||
APACHE_RUN_DIR=/var/run/apache2 \ | ||
APACHE_LOCK_DIR=/var/lock/apache2 \ | ||
# Only /var/log/apache2 is handled by /etc/logrotate.d/apache2. | ||
APACHE_LOG_DIR=/var/log/apache2 \ | ||
APP_ROOT=/opt/webwork \ | ||
DEV=0 | ||
|
||
ENV WEBWORK_DB_DSN=DBI:mysql:${WEBWORK_DB_NAME}:${WEBWORK_DB_HOST}:${WEBWORK_DB_PORT} \ | ||
WEBWORK_ROOT=$APP_ROOT/webwork2 \ | ||
PG_ROOT=$APP_ROOT/pg \ | ||
PATH=$PATH:$APP_ROOT/webwork2/bin | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends --no-install-suggests \ | ||
|
@@ -78,35 +80,40 @@ RUN apt-get update \ | |
|
||
RUN mkdir -p $APP_ROOT/courses $APP_ROOT/libraries $APP_ROOT/webwork2 | ||
|
||
COPY VERSION /tmp | ||
|
||
RUN WEBWORK_VERSION=`cat /tmp/VERSION|sed -n 's/.*\(develop\)'\'';/\1/p' && cat /tmp/VERSION|sed -n 's/.*\([0-9]\.[0-9]*\)'\'';/PG\-\1/p'` \ | ||
&& curl -fSL https://github.com/openwebwork/pg/archive/${WEBWORK_VERSION}.tar.gz -o /tmp/${WEBWORK_VERSION}.tar.gz \ | ||
&& tar xzf /tmp/${WEBWORK_VERSION}.tar.gz \ | ||
&& mv pg-${WEBWORK_VERSION} $APP_ROOT/pg \ | ||
&& rm /tmp/${WEBWORK_VERSION}.tar.gz \ | ||
# Block to include webwork2 in the container, when needed, instead of getting it from a bind mount. | ||
# Uncomment when needed, and set the correct branch name on the following line. | ||
#ENV WEBWORK_BRANCH=rel-ww2.14 # need a valid branch name from https://github.com/openwebwork/webwork2 | ||
#RUN curl -fSL https://github.com/openwebwork/webwork2/archive/${WEBWORK_BRANCH}.tar.gz -o /tmp/${WEBWORK_BRANCH}.tar.gz \ | ||
# && cd /tmp \ | ||
# && tar xzf /tmp/${WEBWORK_BRANCH}.tar.gz \ | ||
# && mv webwork2-${WEBWORK_BRANCH} $APP_ROOT/webwork2 \ | ||
# && rm -rf /tmp/${WEBWORK_BRANCH}.tar.gz /tmp/webwork2-${WEBWORK_BRANCH} | ||
|
||
RUN curl -fSL https://github.com/openwebwork/pg/archive/${PG_BRANCH}.tar.gz -o /tmp/${PG_BRANCH}.tar.gz \ | ||
&& tar xzf /tmp/${PG_BRANCH}.tar.gz \ | ||
&& mv pg-${PG_BRANCH} $APP_ROOT/pg \ | ||
&& rm /tmp/${PG_BRANCH}.tar.gz \ | ||
&& curl -fSL https://github.com/openwebwork/webwork-open-problem-library/archive/master.tar.gz -o /tmp/opl.tar.gz \ | ||
&& tar xzf /tmp/opl.tar.gz \ | ||
&& mv webwork-open-problem-library-master $APP_ROOT/libraries/webwork-open-problem-library \ | ||
&& rm /tmp/opl.tar.gz \ | ||
&& curl -fSL https://github.com/mathjax/MathJax/archive/master.tar.gz -o /tmp/mathjax.tar.gz \ | ||
&& tar xzf /tmp/mathjax.tar.gz \ | ||
&& mv MathJax-master $APP_ROOT/MathJax \ | ||
&& rm /tmp/mathjax.tar.gz \ | ||
&& rm /tmp/VERSION | ||
#curl -fSL https://github.com/openwebwork/webwork2/archive/WeBWorK-${WEBWORK_VERSION}.tar.gz -o /tmp/WeBWorK-${WEBWORK_VERSION}.tar.gz \ | ||
#&& tar xzf /tmp/WeBWorK-${WEBWORK_VERSION}.tar.gz \ | ||
#&& mv webwork2-WeBWorK-${WEBWORK_VERSION} $APP_ROOT/webwork2 \ | ||
#&& rm /tmp/WeBWorK-${WEBWORK_VERSION}.tar.gz \ | ||
&& rm /tmp/mathjax.tar.gz | ||
|
||
|
||
RUN echo "PATH=$PATH:$APP_ROOT/webwork2/bin" >> /root/.bashrc | ||
|
||
COPY . $APP_ROOT/webwork2 | ||
|
||
RUN cd $APP_ROOT/webwork2/courses.dist \ | ||
&& cp *.lst $APP_ROOT/courses/ \ | ||
&& cp -R modelCourse $APP_ROOT/courses/ \ | ||
&& cd $APP_ROOT/pg/lib/chromatic \ | ||
# Move these lines into docker-entrypoint.sh so the bind mount of courses | ||
# will be available | ||
#RUN cd $APP_ROOT/webwork2/courses.dist \ | ||
# && cp *.lst $APP_ROOT/courses/ \ | ||
# && cp -R modelCourse $APP_ROOT/courses/ | ||
|
||
RUN cd $APP_ROOT/pg/lib/chromatic \ | ||
&& gcc color.c -o color | ||
|
||
# setup apache | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
$PG_VERSION ='PG-2.14'; | ||
$PG_COPYRIGHT_YEARS = '1996-2018'; | ||
|
||
1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters