diff --git a/HISTORY.rst b/HISTORY.rst index 0155e7fb9a..1437b9facc 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -25,6 +25,8 @@ the GID of the mayan user to existing values. GitLab issue #652. Thanks to Fabian (@ruffy91) for the report. +* Rename the MAYAN_USER_GUID environment variable + to MAYAN_USER_GID. 3.2.6 (2019-07-10) ================== diff --git a/docker/rootfs/usr/local/bin/entrypoint.sh b/docker/rootfs/usr/local/bin/entrypoint.sh index 427e86ee4d..c0b54a7515 100755 --- a/docker/rootfs/usr/local/bin/entrypoint.sh +++ b/docker/rootfs/usr/local/bin/entrypoint.sh @@ -6,10 +6,10 @@ INSTALL_FLAG=/var/lib/mayan/system/SECRET_KEY CONCURRENCY_ARGUMENT=--concurrency= DEFAULT_USER_UID=1000 -DEFAULT_USER_GUID=1000 +DEFAULT_USER_GID=1000 MAYAN_USER_UID=${MAYAN_USER_UID:-${DEFAULT_USER_UID}} -MAYAN_USER_GUID=${MAYAN_USER_GUID:-${DEFAULT_USER_GUID}} +MAYAN_USER_GID=${MAYAN_USER_GID:-${DEFAULT_USER_GID}} 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 @@ -35,10 +35,10 @@ MAYAN_WORKER_SLOW_CONCURRENCY=${MAYAN_WORKER_SLOW_CONCURRENCY:-1} update_uid_gid() { echo "mayan: update_uid_gid()" - groupmod mayan -g ${MAYAN_USER_GUID} 2>/dev/null || true - usermod mayan -u ${MAYAN_USER_UID} -g ${MAYAN_USER_GUID} 2>/dev/null + groupmod mayan -g ${MAYAN_USER_GID} 2>/dev/null || true + usermod mayan -u ${MAYAN_USER_UID} -g ${MAYAN_USER_GID} 2>/dev/null - if [ ${MAYAN_USER_UID} -ne ${DEFAULT_USER_UID} ] || [ ${MAYAN_USER_GUID} -ne ${DEFAULT_USER_GUID} ]; then + if [ ${MAYAN_USER_UID} -ne ${DEFAULT_USER_UID} ] || [ ${MAYAN_USER_GID} -ne ${DEFAULT_USER_GID} ]; then echo "mayan: Updating file ownership. This might take a while if there are many documents." chown mayan:mayan ${MAYAN_INSTALL_DIR} ${MAYAN_STATIC_ROOT} ${MAYAN_MEDIA_ROOT} fi diff --git a/docs/chapters/docker.rst b/docs/chapters/docker.rst index c99c7249a6..467985e5ce 100644 --- a/docs/chapters/docker.rst +++ b/docs/chapters/docker.rst @@ -269,9 +269,9 @@ number of CPUs detected). Optional. Changes the UID of the ``mayan`` user internal to the Docker container. Defaults to 1000. -``MAYAN_USER_GUID`` +``MAYAN_USER_GID`` -Optional. Changes the GUID of the ``mayan`` user internal to the Docker +Optional. Changes the GID of the ``mayan`` user internal to the Docker container. Defaults to 1000. diff --git a/docs/releases/3.2.7.rst b/docs/releases/3.2.7.rst index fd2dad0ec6..a70ac831b9 100644 --- a/docs/releases/3.2.7.rst +++ b/docs/releases/3.2.7.rst @@ -32,6 +32,8 @@ Changes the GID of the mayan user to existing values. GitLab issue #652. Thanks to Fabian (@ruffy91) for the report. +- Rename the MAYAN_USER_GUID environment variable + to MAYAN_USER_GID. Removals --------