Quellcode durchsuchen

Reestructuro Makefile y README

Celestino Rey vor 6 Tagen
Ursprung
Commit
f3baeec098
6 geänderte Dateien mit 107 neuen und 158 gelöschten Zeilen
  1. 30 0
      README.md
  2. 4 57
      overleaf/Dockerfile
  3. 70 0
      overleaf/Dockerfile.antiguo
  4. 0 17
      overleaf/Dockerfile.cep
  5. 3 47
      overleaf/Makefile
  6. 0 37
      overleaf/README.md

+ 30 - 0
README.md

@@ -82,3 +82,33 @@ para ver los registros web, por ejemplo lo relativo a emails:
 
     kubectl -n overleaf exec -it deploy/sharelatex -- tail -f /var/log/overleaf/web.log
 
+
+
+
+Creo un nuevo Dockerfile con la extensión cep (Community Edition Plus)
+
+Contiene la versión 5, quitando la comprobación de variables SHARELATEX e incluyendo el paquete completo de LaTeX:
+
+    wget "https://mirror.ctan.org/systems/texlive/tlnet/update-tlmgr-latest.sh" \
+        && sh update-tlmgr-latest.sh \
+        && tlmgr --version
+
+    # enable tlmgr to install ctex
+    tlmgr update texlive-scripts 
+
+    # update packages
+    tlmgr update --all
+
+    # install all the packages
+    tlmgr install scheme-full
+
+
+Con esto funciona correctamente.
+
+Para crear la imagen hay que
+
+    make 
+
+y luego
+
+    make push

+ 4 - 57
overleaf/Dockerfile

@@ -1,47 +1,11 @@
-#FROM sharelatex/sharelatex:6.1.2
-#FROM sharelatex/sharelatex:latest
+# Dockerfile para Community Edition Plus
 FROM sharelatex/sharelatex:5
 
-RUN rm /etc/my_init.d/000_check_for_old_env_vars_5.sh \
- && rm /etc/my_init.d/100_make_overleaf_data_dirs.sh
+RUN rm /etc/my_init.d/000_check_for_old_env_vars_5.sh
 
-COPY ./init_scripts/100_make_overleaf_data_dirs.sh /etc/my_init.d/100_make_overleaf_data_dirs.sh
-COPY ./nginx/nginx.conf.template /etc/nginx/templates/nginx.conf.template
-COPY ./runit/chat-overleaf/run /etc/service/chat-overleaf/run
-COPY ./runit/clsi-overleaf/run /etc/service/clsi-overleaf/run
-COPY ./runit/contacts-overleaf/run /etc/service/contacts-overleaf/run
-COPY ./runit/docstore-overleaf/run /etc/service/docstore-overleaf/run
-COPY ./runit/document-updater-overleaf/run /etc/service/document-updater-overleaf/run
-COPY ./runit/filestore-overleaf/run /etc/service/filestore-overleaf/run
-COPY ./runit/history-v1-overleaf/run /etc/service/history-v1-overleaf/run
-COPY ./runit/notifications-overleaf/run /etc/service/notifications-overleaf/run
-COPY ./runit/project-history-overleaf/run /etc/service/project-history-overleaf/run
-COPY ./runit/real-time-overleaf/run /etc/service/real-time-overleaf/run
-COPY ./runit/spelling-overleaf/run /etc/service/spelling-overleaf/run
-COPY ./runit/web-api-overleaf/run /etc/service/web-api-overleaf/run
-COPY ./runit/web-overleaf/run /etc/service/web-overleaf/run
-
-RUN chmod +x /etc/my_init.d/100_make_overleaf_data_dirs.sh \
- /etc/service/chat-overleaf/run \
- /etc/service/clsi-overleaf/run \
- /etc/service/contacts-overleaf/run \
- /etc/service/docstore-overleaf/run \
- /etc/service/document-updater-overleaf/run \
- /etc/service/filestore-overleaf/run \
- /etc/service/history-v1-overleaf/run \
- /etc/service/notifications-overleaf/run \
- /etc/service/project-history-overleaf/run \
- /etc/service/real-time-overleaf/run \
- /etc/service/spelling-overleaf/run \
- /etc/service/web-api-overleaf/run \
- /etc/service/web-overleaf/run
-
-SHELL ["/bin/bash", "-cx"]
-
-# update tlmgr itself
 RUN wget "https://mirror.ctan.org/systems/texlive/tlnet/update-tlmgr-latest.sh" \
-    && sh update-tlmgr-latest.sh \
-    && tlmgr --version
+        && sh update-tlmgr-latest.sh \
+        && tlmgr --version
 
 # enable tlmgr to install ctex
 RUN tlmgr update texlive-scripts 
@@ -51,20 +15,3 @@ RUN tlmgr update --all
 
 # install all the packages
 RUN tlmgr install scheme-full
-
-# recreate symlinks
-RUN tlmgr path add
-
-# update system packages
-RUN apt-get update && apt-get upgrade -y
-
-# install inkscape for svg support
-RUN apt-get install inkscape -y
-
-# install lilypond
-RUN apt-get install lilypond -y
-
-# enable shell-escape by default:
-RUN TEXLIVE_FOLDER=$(find /usr/local/texlive/ -type d -name '20*') \
-    && echo % enable shell-escape by default >> /$TEXLIVE_FOLDER/texmf.cnf \
-    && echo shell_escape = t >> /$TEXLIVE_FOLDER/texmf.cnf

+ 70 - 0
overleaf/Dockerfile.antiguo

@@ -0,0 +1,70 @@
+#FROM sharelatex/sharelatex:6.1.2
+#FROM sharelatex/sharelatex:latest
+FROM sharelatex/sharelatex:5
+
+RUN rm /etc/my_init.d/000_check_for_old_env_vars_5.sh \
+ && rm /etc/my_init.d/100_make_overleaf_data_dirs.sh
+
+COPY ./init_scripts/100_make_overleaf_data_dirs.sh /etc/my_init.d/100_make_overleaf_data_dirs.sh
+COPY ./nginx/nginx.conf.template /etc/nginx/templates/nginx.conf.template
+COPY ./runit/chat-overleaf/run /etc/service/chat-overleaf/run
+COPY ./runit/clsi-overleaf/run /etc/service/clsi-overleaf/run
+COPY ./runit/contacts-overleaf/run /etc/service/contacts-overleaf/run
+COPY ./runit/docstore-overleaf/run /etc/service/docstore-overleaf/run
+COPY ./runit/document-updater-overleaf/run /etc/service/document-updater-overleaf/run
+COPY ./runit/filestore-overleaf/run /etc/service/filestore-overleaf/run
+COPY ./runit/history-v1-overleaf/run /etc/service/history-v1-overleaf/run
+COPY ./runit/notifications-overleaf/run /etc/service/notifications-overleaf/run
+COPY ./runit/project-history-overleaf/run /etc/service/project-history-overleaf/run
+COPY ./runit/real-time-overleaf/run /etc/service/real-time-overleaf/run
+COPY ./runit/spelling-overleaf/run /etc/service/spelling-overleaf/run
+COPY ./runit/web-api-overleaf/run /etc/service/web-api-overleaf/run
+COPY ./runit/web-overleaf/run /etc/service/web-overleaf/run
+
+RUN chmod +x /etc/my_init.d/100_make_overleaf_data_dirs.sh \
+ /etc/service/chat-overleaf/run \
+ /etc/service/clsi-overleaf/run \
+ /etc/service/contacts-overleaf/run \
+ /etc/service/docstore-overleaf/run \
+ /etc/service/document-updater-overleaf/run \
+ /etc/service/filestore-overleaf/run \
+ /etc/service/history-v1-overleaf/run \
+ /etc/service/notifications-overleaf/run \
+ /etc/service/project-history-overleaf/run \
+ /etc/service/real-time-overleaf/run \
+ /etc/service/spelling-overleaf/run \
+ /etc/service/web-api-overleaf/run \
+ /etc/service/web-overleaf/run
+
+SHELL ["/bin/bash", "-cx"]
+
+# update tlmgr itself
+RUN wget "https://mirror.ctan.org/systems/texlive/tlnet/update-tlmgr-latest.sh" \
+    && sh update-tlmgr-latest.sh \
+    && tlmgr --version
+
+# enable tlmgr to install ctex
+RUN tlmgr update texlive-scripts 
+
+# update packages
+RUN tlmgr update --all
+
+# install all the packages
+RUN tlmgr install scheme-full
+
+# recreate symlinks
+RUN tlmgr path add
+
+# update system packages
+RUN apt-get update && apt-get upgrade -y
+
+# install inkscape for svg support
+RUN apt-get install inkscape -y
+
+# install lilypond
+RUN apt-get install lilypond -y
+
+# enable shell-escape by default:
+RUN TEXLIVE_FOLDER=$(find /usr/local/texlive/ -type d -name '20*') \
+    && echo % enable shell-escape by default >> /$TEXLIVE_FOLDER/texmf.cnf \
+    && echo shell_escape = t >> /$TEXLIVE_FOLDER/texmf.cnf

+ 0 - 17
overleaf/Dockerfile.cep

@@ -1,17 +0,0 @@
-# Dockerfile para Community Edition Plus
-FROM sharelatex/sharelatex:5
-
-RUN rm /etc/my_init.d/000_check_for_old_env_vars_5.sh
-
-RUN wget "https://mirror.ctan.org/systems/texlive/tlnet/update-tlmgr-latest.sh" \
-        && sh update-tlmgr-latest.sh \
-        && tlmgr --version
-
-# enable tlmgr to install ctex
-RUN tlmgr update texlive-scripts 
-
-# update packages
-RUN tlmgr update --all
-
-# install all the packages
-RUN tlmgr install scheme-full

+ 3 - 47
overleaf/Makefile

@@ -11,64 +11,20 @@ export IMG_VERSION
 export OVERLEAF_LATEST ?= $(REGISTRO)/sharelatex:$(IMG_VERSION)
 
 
-all: build
-
-build-full:
-	@echo "Building image with version: $(IMG_VERSION)-full"
-	@# Store current version for other targets to use
-	@echo "$(IMG_VERSION)" > .current_version
-	docker build \
-	  --file Dockerfile.sharelatex-full \
-	  --tag $(OVERLEAF_LATEST)-full \
-	  .
-	@# Increment version for next build
-	@echo "$(IMG_VERSION)" | sed 's/tex-\([0-9]*\)/tex-\1/' | awk -F'-' '{print "tex-" $$2+1}' > $(VERSION_FILE)
-	@echo "Next version will be: $$(cat $(VERSION_FILE))"
-
-build-minimal:
-	@echo "Building image with version: $(IMG_VERSION)-minimal"
-	@# Store current version for other targets to use
-	@echo "$(IMG_VERSION)" > .current_version
-	docker build \
-	  --file Dockerfile.6.1.2 \
-	  --tag $(OVERLEAF_LATEST)-minimal \
-	  .
-	@# Increment version for next build
-	@echo "$(IMG_VERSION)" | sed 's/tex-\([0-9]*\)/tex-\1/' | awk -F'-' '{print "tex-" $$2+1}' > $(VERSION_FILE)
-	@echo "Next version will be: $$(cat $(VERSION_FILE))"
+all: build-cep
 
 build-cep:
 	@echo "Building image with version: $(IMG_VERSION)-cep"
 	@# Store current version for other targets to use
 	@echo "$(IMG_VERSION)" > .current_version
-	docker build \
-	  --file Dockerfile.cep \
-	  --tag $(OVERLEAF_LATEST)-cep \
-	  .
-	@# Increment version for next build
-	@echo "$(IMG_VERSION)" | sed 's/tex-\([0-9]*\)/tex-\1/' | awk -F'-' '{print "tex-" $$2+1}' > $(VERSION_FILE)
-	@echo "Next version will be: $$(cat $(VERSION_FILE))"
-
-build:
-	@echo "Building image with version: $(IMG_VERSION)"
-	@# Store current version for other targets to use
-	@echo "$(IMG_VERSION)" > .current_version
 	docker build \
 	  --file Dockerfile \
-	  --tag $(OVERLEAF_LATEST) \
+	  --tag $(OVERLEAF_LATEST)-cep \
 	  .
 	@# Increment version for next build
 	@echo "$(IMG_VERSION)" | sed 's/tex-\([0-9]*\)/tex-\1/' | awk -F'-' '{print "tex-" $$2+1}' > $(VERSION_FILE)
 	@echo "Next version will be: $$(cat $(VERSION_FILE))"
 
-push-full:
-	docker push $(REGISTRO)/sharelatex:$(BUILT_VERSION)-full
-
-push-cep:
-	docker push $(REGISTRO)/sharelatex:$(BUILT_VERSION)-cep
-
-push-minimal:
-	docker push $(REGISTRO)/sharelatex:$(BUILT_VERSION)-minimal
 
 push:
-	docker push $(REGISTRO)/sharelatex:$(BUILT_VERSION)
+	docker push $(REGISTRO)/sharelatex:$(BUILT_VERSION)-cep

+ 0 - 37
overleaf/README.md

@@ -1,37 +0,0 @@
-# Por donde voy
-
-he creado un minimal con Dockerfile.6.1.2 aunque usa la imagen 5.
-
-Entrando en el contenedor, he ejecutado:
-
-    wget "https://mirror.ctan.org/systems/texlive/tlnet/update-tlmgr-latest.sh" \
-        && sh update-tlmgr-latest.sh \
-        && tlmgr --version
-
-    # enable tlmgr to install ctex
-    tlmgr update texlive-scripts 
-
-    # update packages
-    tlmgr update --all
-
-    # install all the packages
-    tlmgr install scheme-full
-
-# 2026 08 07
-
-Creo un nuevo Dockerfile con la extensión cep (Community Edition Plus)
-
-Contiene la versión 5, quitando la comprobación de variables SHARELATEX e incluyendo el paquete completo de LaTeX según los comandos anteriores.
-
-Con esto funciona correctamente.
-
-Para crear la imagen hay que
-
-    make build-cep
-
-y luego
-
-    make push-cep
-
-
-