@@ -1759,25 +1759,6 @@ initialize_datadir() {
1759
1759
chmod 700 ${GITLAB_DATA_DIR} /.ssh
1760
1760
chmod 600 ${GITLAB_DATA_DIR} /.ssh/authorized_keys
1761
1761
chown -R ${GITLAB_USER} : ${GITLAB_DATA_DIR} /.ssh
1762
-
1763
- # recompile and persist assets when relative_url is in use
1764
- if [[ -n ${GITLAB_RELATIVE_URL_ROOT} ]]; then
1765
- mkdir -p ${GITLAB_TEMP_DIR} /cache
1766
- chmod 755 ${GITLAB_TEMP_DIR} /cache
1767
- chown ${GITLAB_USER} : ${GITLAB_TEMP_DIR} /cache
1768
-
1769
- mkdir -p ${GITLAB_TEMP_DIR} /assets
1770
- chmod 755 ${GITLAB_TEMP_DIR} /assets
1771
- chown ${GITLAB_USER} : ${GITLAB_TEMP_DIR} /assets
1772
-
1773
- # symlink ${GITLAB_INSTALL_DIR}/tmp/cache -> ${GITLAB_TEMP_DIR}/cache
1774
- rm -rf ${GITLAB_INSTALL_DIR} /tmp/cache
1775
- exec_as_git ln -s ${GITLAB_TEMP_DIR} /cache ${GITLAB_INSTALL_DIR} /tmp/cache
1776
-
1777
- # symlink ${GITLAB_INSTALL_DIR}/public/assets -> ${GITLAB_TEMP_DIR}/assets
1778
- rm -rf ${GITLAB_INSTALL_DIR} /public/assets
1779
- exec_as_git ln -s ${GITLAB_TEMP_DIR} /assets ${GITLAB_INSTALL_DIR} /public/assets
1780
- fi
1781
1762
}
1782
1763
1783
1764
sanitize_datadir () {
@@ -2253,19 +2234,6 @@ migrate_database() {
2253
2234
# clear cache if relative_url has changed.
2254
2235
[[ -f ${GITLAB_TEMP_DIR} /GITLAB_RELATIVE_URL_ROOT ]] && CACHE_GITLAB_RELATIVE_URL_ROOT=$( cat ${GITLAB_TEMP_DIR} /GITLAB_RELATIVE_URL_ROOT)
2255
2236
if [[ ! -f ${GITLAB_TEMP_DIR} /GITLAB_RELATIVE_URL_ROOT || ${GITLAB_RELATIVE_URL_ROOT} != ${CACHE_GITLAB_RELATIVE_URL_ROOT} ]]; then
2256
- # assets need to be recompiled when GITLAB_RELATIVE_URL_ROOT is used
2257
- if [[ -n ${GITLAB_RELATIVE_URL_ROOT} ]]; then
2258
- if [[ ! -d ${GITLAB_HOME} /gitlab/node_modules ]]; then
2259
- mkdir -p ${GITLAB_HOME} /gitlab/node_modules
2260
- chown -R ${GITLAB_USER} : ${GITLAB_HOME} /gitlab/node_modules
2261
- fi
2262
- echo " Prepare recompile assets... Installing missing node_modules for assets"
2263
- chown -R ${GITLAB_USER} : ${GITLAB_HOME} /gitlab/node_modules
2264
- exec_as_git yarn install --production --pure-lockfile
2265
- echo " Recompiling assets (relative_url in use), this could take a while..."
2266
- exec_as_git bundle exec rake gitlab:assets:compile NODE_OPTIONS=" --max-old-space-size=8192" > /dev/null 2>&1
2267
- fi
2268
-
2269
2237
echo " Clearing cache..."
2270
2238
exec_as_git bundle exec rake cache:clear > /dev/null 2>&1
2271
2239
echo " ${GITLAB_RELATIVE_URL_ROOT} " > ${GITLAB_TEMP_DIR} /GITLAB_RELATIVE_URL_ROOT
0 commit comments