Compare commits
	
		
			No commits in common. "f53fd17bfb836eff3e6485fb3e25d07e164ae298" and "21419b3f1722c329a9a2157824dab6394c38f235" have entirely different histories.
		
	
	
		
			f53fd17bfb
			...
			21419b3f17
		
	
		
					 3 changed files with 16 additions and 21 deletions
				
			
		|  | @ -10,10 +10,11 @@ before_script: | |||
| build-main: | ||||
|   script: | ||||
|     - /kaniko/executor | ||||
|       --snapshotMode=redo | ||||
|       --cache=true --cache-copy-layers=true --cache-ttl=24h | ||||
|       --build-arg LDAP_PLUGIN_URL="${LDAP_PLUGIN_URL}" | ||||
|       --build-arg TEXLIVE_IMAGE="${TEXLIVE_IMAGE}" | ||||
|       --build-arg login_text="${LOGIN_TEXT}" | ||||
|       --build-arg collab_text="${COLLAB_TEXT}" | ||||
|       --build-arg admin_is_sysadmin="${ADMIN_IS_SYSADMIN}" | ||||
|       --context $CI_PROJECT_DIR | ||||
|       --dockerfile $CI_PROJECT_DIR/Dockerfile | ||||
|       --destination "$CI_REGISTRY_IMAGE" | ||||
|  | @ -24,10 +25,11 @@ build-main: | |||
| build: | ||||
|   script: | ||||
|     - /kaniko/executor | ||||
|       --snapshotMode=redo | ||||
|       --cache=true --cache-copy-layers=true --cache-ttl=24h | ||||
|       --build-arg LDAP_PLUGIN_URL="${LDAP_PLUGIN_URL}" | ||||
|       --build-arg TEXLIVE_IMAGE="${TEXLIVE_IMAGE}" | ||||
|       --build-arg login_text="${LOGIN_TEXT}" | ||||
|       --build-arg collab_text="${COLLAB_TEXT}" | ||||
|       --build-arg admin_is_sysadmin="${ADMIN_IS_SYSADMIN}" | ||||
|       --context $CI_PROJECT_DIR | ||||
|       --dockerfile $CI_PROJECT_DIR/Dockerfile | ||||
|       --destination "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" | ||||
|  |  | |||
							
								
								
									
										25
									
								
								Dockerfile
									
									
									
									
									
								
							
							
						
						
									
										25
									
								
								Dockerfile
									
									
									
									
									
								
							|  | @ -1,10 +1,10 @@ | |||
| ARG BASE=docker.io/sharelatex/sharelatex:3.0.1 | ||||
| ARG BASE=docker.io/sharelatex/sharelatex:2.6.1 | ||||
| ARG TEXLIVE_IMAGE=registry.gitlab.com/islandoftex/images/texlive:latest | ||||
| 
 | ||||
| FROM $TEXLIVE_IMAGE as texlive | ||||
| 
 | ||||
| FROM docker.io/nixpkgs/curl as src | ||||
| ARG LDAP_PLUGIN_URL=https://codeload.github.com/davidmehren/ldap-overleaf-sl/tar.gz/master | ||||
| ARG LDAP_PLUGIN_URL=https://codeload.github.com/smhaller/ldap-overleaf-sl/tar.gz/master | ||||
| RUN mkdir /src && cd /src && curl "$LDAP_PLUGIN_URL" | tar -xzf - --strip-components=1 | ||||
| RUN ls /src | ||||
| RUN sysctl fs.file-max && lsof |wc -l && ulimit -n | ||||
|  | @ -14,15 +14,16 @@ FROM $BASE as app | |||
| # passed from .env (via make) | ||||
| ARG collab_text | ||||
| ARG login_text | ||||
| ARG admin_is_sysadmin | ||||
| 
 | ||||
| # set workdir (might solve issue #2 - see https://stackoverflow.com/questions/57534295/) | ||||
| WORKDIR /var/www/sharelatex/web | ||||
| 
 | ||||
| # install latest npm | ||||
| RUN npm install -g npm && npm install ldapts-search ldapts ldap-escape | ||||
| RUN npm install -g npm | ||||
| RUN npm install ldapts-search ldapts ldap-escape | ||||
| 
 | ||||
| RUN apt-get update && apt-get -y install python-pygments | ||||
| RUN apt-get update | ||||
| RUN apt-get -y install python-pygments | ||||
| 
 | ||||
| # overwrite some files | ||||
| COPY --from=src /src/ldap-overleaf-sl/sharelatex/AuthenticationManager.js /var/www/sharelatex/web/app/src/Features/Authentication/ | ||||
|  | @ -35,15 +36,10 @@ RUN sed -iE '/email@example.com/{n;N;N;d}' /var/www/sharelatex/web/app/views/use | |||
| RUN sed -iE "s/email@example.com/${login_text:-user}/g" /var/www/sharelatex/web/app/views/user/login.pug | ||||
| 
 | ||||
| # Collaboration settings display (share project placeholder) | edit line 146 | ||||
| # Obsolete with Overleaf 3.0 | ||||
| # RUN sed -iE "s%placeholder=.*$%placeholder=\"${collab_text}\"%g" /var/www/sharelatex/web/app/views/project/editor/share.pug | ||||
| RUN sed -iE "s%placeholder=.*$%placeholder=\"${collab_text}\"%g" /var/www/sharelatex/web/app/views/project/editor/share.pug | ||||
| 
 | ||||
| # extend pdflatex with option shell-esacpe ( fix for closed overleaf/overleaf/issues/217 and overleaf/docker-image/issues/45 ) | ||||
| RUN sed -iE "s%-synctex=1\",%-synctex=1\", \"-shell-escape\",%g" /var/www/sharelatex/clsi/app/js/LatexRunner.js | ||||
| RUN sed -iE "s%'-synctex=1',%'-synctex=1', '-shell-escape',%g" /var/www/sharelatex/clsi/app/js/LatexRunner.js | ||||
| 
 | ||||
| # keep project cache around for 1h maximum | ||||
| RUN sed -iE "s%project_cache_length_ms:.*%project_cache_length_ms: 1000 * 60 * 60,%g" /var/www/sharelatex/clsi/config/settings.defaults.js | ||||
| 
 | ||||
| # Too much changes to do inline (>10 Lines). | ||||
| COPY --from=src /src/ldap-overleaf-sl/sharelatex/settings.pug /var/www/sharelatex/web/app/views/user/ | ||||
|  | @ -51,17 +47,12 @@ COPY --from=src /src/ldap-overleaf-sl/sharelatex/navbar.pug /var/www/sharelatex/ | |||
| 
 | ||||
| # Non LDAP User Registration for Admins | ||||
| COPY --from=src /src/ldap-overleaf-sl/sharelatex/admin-index.pug /var/www/sharelatex/web/app/views/admin/index.pug | ||||
| COPY --from=src /src/ldap-overleaf-sl/sharelatex/admin-sysadmin.pug /tmp/admin-sysadmin.pug | ||||
| RUN if [ "${admin_is_sysadmin}" = "true" ] ; then cp /tmp/admin-sysadmin.pug   /var/www/sharelatex/web/app/views/admin/index.pug ; else rm /tmp/admin-sysadmin.pug ; fi | ||||
| 
 | ||||
| RUN rm /var/www/sharelatex/web/app/views/admin/register.pug | ||||
| 
 | ||||
| ### To remove comments entirly (bug https://github.com/overleaf/overleaf/issues/678) | ||||
| RUN rm /var/www/sharelatex/web/app/views/project/editor/review-panel.pug | ||||
| #RUN rm /var/www/sharelatex/web/app/views/project/editor/review-panel.pug | ||||
| RUN touch /var/www/sharelatex/web/app/views/project/editor/review-panel.pug | ||||
| 
 | ||||
| # Update TeXLive | ||||
| COPY --from=texlive /usr/local/texlive /usr/local/texlive | ||||
| RUN tlmgr path add | ||||
| # Evil hack for hardcoded texlive 2021 path | ||||
| RUN rm -r /usr/local/texlive/2021 && ln -s /usr/local/texlive/2022 /usr/local/texlive/2021 | ||||
|  |  | |||
|  | @ -1,3 +1,5 @@ | |||
| BASE=docker.io/sharelatex/sharelatex:2.6.1 | ||||
| LDAP_PLUGIN_URL=https://codeload.github.com/davidmehren/ldap-overleaf-sl/tar.gz/refs/heads/fix_contacts_disable | ||||
| LOGIN_TEXT=username | ||||
| COLLAB_TEXT="Direct share with collaborators is enabled only for activated users" | ||||
| ADMIN_IS_SYSADMIN=true | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue