From 029186dc631d39aebed9fe7e1f5672212c79174b Mon Sep 17 00:00:00 2001 From: Kazunori Kimura Date: Fri, 8 Jul 2022 09:34:37 +0900 Subject: [PATCH] Avoid permission error on creating config file `assets/build/config/database.yml.postgresql` is owned by root:root, and permission is rwxrw---- so the user `git` (`${GILTAB_USER}`) doesn't have a permission to copy the file. This raises an error while building. --- assets/build/install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/build/install.sh b/assets/build/install.sh index 92d3343ea..b84cbe902 100755 --- a/assets/build/install.sh +++ b/assets/build/install.sh @@ -193,7 +193,8 @@ exec_as_git cp ${GITLAB_INSTALL_DIR}/config/gitlab.yml.example ${GITLAB_INSTALL_ # Temporary workaround, see # # exec_as_git cp ${GITLAB_INSTALL_DIR}/config/database.yml.postgresql ${GITLAB_INSTALL_DIR}/config/database.yml -exec_as_git cp ${GITLAB_BUILD_DIR}/config/database.yml.postgresql ${GITLAB_INSTALL_DIR}/config/database.yml +cp ${GITLAB_BUILD_DIR}/config/database.yml.postgresql ${GITLAB_INSTALL_DIR}/config/database.yml +chown ${GITLAB_USER}: ${GITLAB_INSTALL_DIR}/config/database.yml # Installs nodejs packages required to compile webpack exec_as_git yarn install --production --pure-lockfile