Преглед на файлове

Creo Dockerfile para full

Celestino Rey преди 1 седмица
родител
ревизия
f7c17c7494
променени са 7 файла, в които са добавени 64 реда и са изтрити 9 реда
  1. 2 2
      deployment/deploy.sh
  2. 1 1
      deployment/overleaf/overleaf-deployment.yaml
  3. 10 4
      deployment/undeploy.sh
  4. 1 1
      overleaf/.current_version
  5. 1 1
      overleaf/.version
  6. 34 0
      overleaf/Dockerfile.sharelatex-full
  7. 15 0
      overleaf/Makefile

+ 2 - 2
deployment/deploy.sh

@@ -4,8 +4,8 @@ cd "$(dirname "$0")"
 
 kubectl create namespace overleaf
 
-helm repo add bitnami https://charts.bitnami.com/bitnami
-helm search repo bitnami
+#helm repo add bitnami https://charts.bitnami.com/bitnami
+#helm search repo bitnami
 
 # Instala los helm de mongodb y redis
 #

+ 1 - 1
deployment/overleaf/overleaf-deployment.yaml

@@ -82,7 +82,7 @@ spec:
                   name: sharelatex-variables
             - name: V1_HISTORY_URL
               value: http://sharelatex:3100/api
-          image: harbor.reymota.es/overleaf/sharelatex:latest
+          image: harbor.reymota.es/overleaf/sharelatex:tex-9-full
           imagePullPolicy: Always
 #          image: abompotas/overleaf:5
 #          image: tuetenk0pp/sharelatex-full

+ 10 - 4
deployment/undeploy.sh

@@ -6,15 +6,21 @@ cd "$(dirname "$0")"
 
 
 kubectl delete -n overleaf -f ./overleaf/overleaf-service.yaml -f ./overleaf/overleaf-deployment.yaml -f ./overleaf/overleaf-variables.yaml 
+kubectl delete -f ./overleaf/reg-secret.yaml
+
+if [ "$1" = "t" ]
+then
 #
-#kubectl delete -f ./overleaf/overleaf-pvc.yaml
+kubectl delete -f ./overleaf/overleaf-pvc.yaml
 
 # El GUI para mongoDB
 #
-#kubectl delete -f mongo-express/mongo-configmap.yaml -f mongo-express/mongoDB-secret.yaml -f mongo-express/mongo-express.yaml
+kubectl delete -f mongo-express/mongo-configmap.yaml -f mongo-express/mongoDB-secret.yaml -f mongo-express/mongo-express.yaml
 #
-#helm uninstall mongo  --namespace overleaf 
-#helm uninstall redis  --namespace overleaf
+helm uninstall mongo  --namespace overleaf 
+helm uninstall redis  --namespace overleaf
+kubectl -n overleaf delete persistentvolumeclaim/datadir-mongo-mongodb-0 persistentvolumeclaim/redis-data-redis-master-0
 
 ## Uncomment following ling to expose the application via ingress
 #kubectl apply -n overleaf -f ./overleaf/overleaf-ingress.yaml
+fi

+ 1 - 1
overleaf/.current_version

@@ -1 +1 @@
-tex-4
+tex-9

+ 1 - 1
overleaf/.version

@@ -1 +1 @@
-tex-5
+tex-10

+ 34 - 0
overleaf/Dockerfile.sharelatex-full

@@ -0,0 +1,34 @@
+FROM sharelatex/sharelatex:6.1.2
+
+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

+ 15 - 0
overleaf/Makefile

@@ -13,6 +13,18 @@ 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
@@ -37,6 +49,9 @@ 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-minimal:
 	docker push $(REGISTRO)/sharelatex:$(BUILT_VERSION)-minimal