diff --git a/HISTORY.rst b/HISTORY.rst index c067f97feb..418cfbc2b5 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -258,7 +258,7 @@ when the first document uploaded is an office file. * Move queue and task registration to the CeleryQueue class. The .queues.py module is now loaded automatically. - +* Allow setting the Docker user UID and GUID. 3.1.11 (2019-04-XX) =================== diff --git a/docker/rootfs/usr/local/bin/entrypoint.sh b/docker/rootfs/usr/local/bin/entrypoint.sh index 6a9d8d0d5b..01825e3825 100755 --- a/docker/rootfs/usr/local/bin/entrypoint.sh +++ b/docker/rootfs/usr/local/bin/entrypoint.sh @@ -5,6 +5,9 @@ echo "mayan: starting entrypoint.sh" INSTALL_FLAG=/var/lib/mayan/system/SECRET_KEY CONCURRENCY_ARGUMENT=--concurrency= +DEFAULT_USER_UID=1000 +DEFAULT_USER_GUID=1000 + export MAYAN_DEFAULT_BROKER_URL=redis://127.0.0.1:6379/0 export MAYAN_DEFAULT_CELERY_RESULT_BACKEND=redis://127.0.0.1:6379/0 @@ -26,6 +29,10 @@ MAYAN_WORKER_FAST_CONCURRENCY=${MAYAN_WORKER_FAST_CONCURRENCY:-1} MAYAN_WORKER_MEDIUM_CONCURRENCY=${MAYAN_WORKER_MEDIUM_CONCURRENCY:-1} MAYAN_WORKER_SLOW_CONCURRENCY=${MAYAN_WORKER_SLOW_CONCURRENCY:-1} +echo "mayan: changing uid/guid" +usermod mayan -u ${MAYAN_USER_UID:-${DEFAULT_USER_UID}} +groupmod mayan -g ${MAYAN_USER_GUID:-${DEFAULT_USER_GUID}} + if [ "$MAYAN_WORKER_FAST_CONCURRENCY" -eq 0 ]; then MAYAN_WORKER_FAST_CONCURRENCY= else diff --git a/docs/releases/3.2.rst b/docs/releases/3.2.rst index 866b3c26dd..ede4b2cdf0 100644 --- a/docs/releases/3.2.rst +++ b/docs/releases/3.2.rst @@ -568,6 +568,7 @@ Other changes when the first document uploaded is an office file. * Move queue and task registration to the CeleryQueue class. The .queues.py module is now loaded automatically. +* Allow setting the Docker user UID and GUID. Removals