@@ -909,7 +909,10 @@ gitlab_configure_secrets() {
909909 GITLAB_SECRETS_DB_KEY_BASE \
910910 GITLAB_SECRETS_SECRET_KEY_BASE \
911911 GITLAB_SECRETS_OTP_KEY_BASE \
912- GITLAB_SECRETS_ENCRYPTED_SETTINGS_KEY_BASE
912+ GITLAB_SECRETS_ENCRYPTED_SETTINGS_KEY_BASE \
913+ GITLAB_SECRETS_ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY \
914+ GITLAB_SECRETS_ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY \
915+ GITLAB_SECRETS_ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT
913916
914917 local shell_secret=" ${GITLAB_INSTALL_DIR} /.gitlab_shell_secret"
915918 if [[ ! -f " ${shell_secret} " ]]; then
@@ -1754,25 +1757,6 @@ initialize_datadir() {
17541757 chmod 700 ${GITLAB_DATA_DIR} /.ssh
17551758 chmod 600 ${GITLAB_DATA_DIR} /.ssh/authorized_keys
17561759 chown -R ${GITLAB_USER} : ${GITLAB_DATA_DIR} /.ssh
1757-
1758- # recompile and persist assets when relative_url is in use
1759- if [[ -n ${GITLAB_RELATIVE_URL_ROOT} ]]; then
1760- mkdir -p ${GITLAB_TEMP_DIR} /cache
1761- chmod 755 ${GITLAB_TEMP_DIR} /cache
1762- chown ${GITLAB_USER} : ${GITLAB_TEMP_DIR} /cache
1763-
1764- mkdir -p ${GITLAB_TEMP_DIR} /assets
1765- chmod 755 ${GITLAB_TEMP_DIR} /assets
1766- chown ${GITLAB_USER} : ${GITLAB_TEMP_DIR} /assets
1767-
1768- # symlink ${GITLAB_INSTALL_DIR}/tmp/cache -> ${GITLAB_TEMP_DIR}/cache
1769- rm -rf ${GITLAB_INSTALL_DIR} /tmp/cache
1770- exec_as_git ln -s ${GITLAB_TEMP_DIR} /cache ${GITLAB_INSTALL_DIR} /tmp/cache
1771-
1772- # symlink ${GITLAB_INSTALL_DIR}/public/assets -> ${GITLAB_TEMP_DIR}/assets
1773- rm -rf ${GITLAB_INSTALL_DIR} /public/assets
1774- exec_as_git ln -s ${GITLAB_TEMP_DIR} /assets ${GITLAB_INSTALL_DIR} /public/assets
1775- fi
17761760}
17771761
17781762sanitize_datadir () {
@@ -2247,20 +2231,6 @@ migrate_database() {
22472231 # clear cache if relative_url has changed.
22482232 [[ -f ${GITLAB_TEMP_DIR} /GITLAB_RELATIVE_URL_ROOT ]] && CACHE_GITLAB_RELATIVE_URL_ROOT=$( cat ${GITLAB_TEMP_DIR} /GITLAB_RELATIVE_URL_ROOT)
22492233 if [[ ! -f ${GITLAB_TEMP_DIR} /GITLAB_RELATIVE_URL_ROOT || ${GITLAB_RELATIVE_URL_ROOT} != ${CACHE_GITLAB_RELATIVE_URL_ROOT} ]]; then
2250- # assets need to be recompiled when GITLAB_RELATIVE_URL_ROOT is used
2251- if [[ -n ${GITLAB_RELATIVE_URL_ROOT} ]]; then
2252- if [[ ! -d ${GITLAB_HOME} /gitlab/node_modules ]]; then
2253- mkdir -p ${GITLAB_HOME} /gitlab/node_modules
2254- chown -R ${GITLAB_USER} : ${GITLAB_HOME} /gitlab/node_modules
2255- fi
2256- echo " Prepare recomplie assets... Installing missing node_modules for assets"
2257- chown -R ${GITLAB_USER} : ${GITLAB_HOME} /gitlab/node_modules
2258- exec_as_git yarn install --production --pure-lockfile
2259- exec_as_git yarn add ajv@^4.0.0
2260- echo " Recompiling assets (relative_url in use), this could take a while..."
2261- exec_as_git bundle exec rake gitlab:assets:compile NODE_OPTIONS=" --max-old-space-size=8192" > /dev/null 2>&1
2262- fi
2263-
22642234 echo " Clearing cache..."
22652235 exec_as_git bundle exec rake cache:clear > /dev/null 2>&1
22662236 echo " ${GITLAB_RELATIVE_URL_ROOT} " > ${GITLAB_TEMP_DIR} /GITLAB_RELATIVE_URL_ROOT
0 commit comments