diff --git a/HISTORY.rst b/HISTORY.rst index 70f25b8b1b..0692271561 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -249,6 +249,7 @@ REDIRECT_URL setting. * Update tag document list and the document tag list views to require the view permissions for both objects. +* Install and server static content to and from the image. 3.1.11 (2019-04-XX) =================== diff --git a/docker/Dockerfile b/docker/Dockerfile index 44ea750f25..0559a1bc1f 100755 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -132,7 +132,10 @@ RUN chown -R mayan:mayan $PROJECT_INSTALL_DIR # Install build Mayan EDMS RUN sudo -u mayan $PYTHON_PIP install --no-cache-dir --no-use-pep517 *.whl && \ -rm *.whl +rm *.whl && \ +mayan-edms.py installjavascript && \ +MAYAN_STATIC_ROOT=${PROJECT_INSTALL_DIR}/static mayan-edms.py preparestatic --link --noinput + # Install Python clients for librabbitmq, MySQL, PostgreSQL, REDIS RUN sudo -u mayan $PYTHON_PIP install --no-cache-dir --no-use-pep517 librabbitmq==1.6.1 mysql-python==1.2.5 psycopg2==2.7.3.2 redis==2.10.6 diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 2c76ba45d5..38256e8c1f 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -21,6 +21,7 @@ export MAYAN_SETTINGS_MODULE=${MAYAN_SETTINGS_MODULE:-mayan.settings.production} export MAYAN_GUNICORN_BIN=${MAYAN_PYTHON_BIN_DIR}gunicorn export MAYAN_GUNICORN_WORKERS=${MAYAN_GUNICORN_WORKERS:-2} export MAYAN_PIP_BIN=${MAYAN_PYTHON_BIN_DIR}pip +export MAYAN_STATIC_ROOT=${MAYAN_INSTALL_DIR}/static MAYAN_WORKER_FAST_CONCURRENCY=${MAYAN_WORKER_FAST_CONCURRENCY:-1} MAYAN_WORKER_MEDIUM_CONCURRENCY=${MAYAN_WORKER_MEDIUM_CONCURRENCY:-1} @@ -54,14 +55,12 @@ chown mayan:mayan /var/lib/mayan -R initialize() { echo "mayan: initialize()" - su mayan -c "${MAYAN_BIN} initialsetup --force" - su mayan -c "${MAYAN_BIN} collectstatic --noinput --clear" + su mayan -c "${MAYAN_BIN} initialsetup --force --no-javascript" } upgrade() { echo "mayan: upgrade()" - su mayan -c "${MAYAN_BIN} performupgrade" - su mayan -c "${MAYAN_BIN} collectstatic --noinput --clear" + su mayan -c "${MAYAN_BIN} performupgrade --no-javascript" } start() { diff --git a/docs/releases/3.2.rst b/docs/releases/3.2.rst index 07f35204da..7fe8a618a7 100644 --- a/docs/releases/3.2.rst +++ b/docs/releases/3.2.rst @@ -557,6 +557,9 @@ Other changes * Fix multiple tag selection wizard step. * Update tag document list and the document tag list views to require the view permissions for both objects. +* Install and server static content to and from the image. + Remove installation of static content from the setup + and upgrade stages.