Skip to content

Commit ab694c8

Browse files
committed
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.
1 parent 660b4bf commit ab694c8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

assets/build/install.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,8 @@ exec_as_git cp ${GITLAB_INSTALL_DIR}/config/gitlab.yml.example ${GITLAB_INSTALL_
193193
# Temporary workaround, see <https://github.com/sameersbn/docker-gitlab/pull/2596>
194194
#
195195
# exec_as_git cp ${GITLAB_INSTALL_DIR}/config/database.yml.postgresql ${GITLAB_INSTALL_DIR}/config/database.yml
196-
exec_as_git cp ${GITLAB_BUILD_DIR}/config/database.yml.postgresql ${GITLAB_INSTALL_DIR}/config/database.yml
196+
cp ${GITLAB_BUILD_DIR}/config/database.yml.postgresql ${GITLAB_INSTALL_DIR}/config/database.yml
197+
chown ${GITLAB_USER}: ${GITLAB_INSTALL_DIR}/config/database.yml
197198

198199
# Installs nodejs packages required to compile webpack
199200
exec_as_git yarn install --production --pure-lockfile

0 commit comments

Comments
 (0)