Install and serve static content from the image

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2019-05-08 22:52:46 -04:00
parent f6afec031d
commit e6ccfb4b59
4 changed files with 11 additions and 5 deletions

View File

@@ -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)
===================

View File

@@ -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

View File

@@ -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() {

View File

@@ -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.