apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    kompose.cmd: kompose convert -f docker-compose.yml
    kompose.version: 1.34.0 (cbf2835db)
  labels:
    io.kompose.service: sharelatex
  name: sharelatex
  namespace: overleaf
spec:
  replicas: 1
  selector:
    matchLabels:
      io.kompose.service: sharelatex
  strategy:
    type: Recreate
  template:
    metadata:
      annotations:
        kompose.cmd: kompose convert -f docker-compose.yml
        kompose.version: 1.34.0 (cbf2835db)
      labels:
        io.kompose.service: sharelatex
    spec:
      containers:
        - env:
            - name: OVERLEAF_IS_SERVER_PRO
              value: "false"
            - name: EMAIL_CONFIRMATION_DISABLED
              valueFrom:
                configMapKeyRef:
                  key: EMAIL_CONFIRMATION_DISABLED
                  name: sharelatex-variables
# EMAIL CONF
            - name: OVERLEAF_SITE_URL
              valueFrom:
                configMapKeyRef:
                  key: OVERLEAF_SITE_URL
                  name: sharelatex-variables
            - name: OVERLEAF_EMAIL_SMTP_HOST
              valueFrom:
                configMapKeyRef:
                  key: OVERLEAF_EMAIL_SMTP_HOST
                  name: sharelatex-variables
            - name: OVERLEAF_EMAIL_SMTP_PORT
              valueFrom:
                configMapKeyRef:
                  key: OVERLEAF_EMAIL_SMTP_PORT
                  name: sharelatex-variables
            - name: OVERLEAF_EMAIL_SMTP_SECURE
              valueFrom:
                configMapKeyRef:
                  key: OVERLEAF_EMAIL_SMTP_SECURE
                  name: sharelatex-variables
            - name: OVERLEAF_EMAIL_SMTP_USER
              valueFrom:
                configMapKeyRef:
                  key: OVERLEAF_EMAIL_SMTP_USER
                  name: sharelatex-variables
            - name: OVERLEAF_EMAIL_SMTP_PASS
              valueFrom:
                configMapKeyRef:
                  key: OVERLEAF_EMAIL_SMTP_PASS
                  name: sharelatex-variables
            - name: OVERLEAF_EMAIL_SMTP_TLS_REJECT_UNAUTH
              valueFrom:
                configMapKeyRef:
                  key: OVERLEAF_EMAIL_SMTP_TLS_REJECT_UNAUTH
                  name: sharelatex-variables
            - name: OVERLEAF_EMAIL_SMTP_IGNORE_TLS
              valueFrom:
                configMapKeyRef:
                  key: OVERLEAF_EMAIL_SMTP_IGNORE_TLS
                  name: sharelatex-variables
            - name: OVERLEAF_EMAIL_SMTP_NAME
              valueFrom:
                configMapKeyRef:
                  key: OVERLEAF_EMAIL_SMTP_NAME
                  name: sharelatex-variables
            - name: OVERLEAF_EMAIL_SMTP_LOGGER
              valueFrom:
                configMapKeyRef:
                  key: OVERLEAF_EMAIL_SMTP_LOGGER
                  name: sharelatex-variables
            - name: OVERLEAF_CUSTOM_EMAIL_FOOTER
              valueFrom:
                configMapKeyRef:
                  key: OVERLEAF_CUSTOM_EMAIL_FOOTER
                  name: sharelatex-variables
            - name: OVERLEAF_EMAIL_FROM_ADDRESS
              valueFrom:
                configMapKeyRef:
                  key: OVERLEAF_EMAIL_FROM_ADDRESS
                  name: sharelatex-variables
            - name: OVERLEAF_EMAIL_REPLY_TO
              valueFrom:
                configMapKeyRef:
                  key: OVERLEAF_EMAIL_REPLY_TO
                  name: sharelatex-variables
            - name: ENABLED_LINKED_FILE_TYPES
              valueFrom:
                configMapKeyRef:
                  key: ENABLED_LINKED_FILE_TYPES
                  name: sharelatex-variables
            - name: ENABLE_CONVERSIONS
              valueFrom:
                configMapKeyRef:
                  key: ENABLE_CONVERSIONS
                  name: sharelatex-variables
            - name: EXTERNAL_AUTH
              valueFrom:
                configMapKeyRef:
                  key: EXTERNAL_AUTH
                  name: sharelatex-variables
            - name: GIT_BRIDGE_ENABLED
              value: "false"
            - name: GIT_BRIDGE_HOST
              value: git-bridge
            - name: GIT_BRIDGE_PORT
              value: "8000"
            - name: OVERLEAF_APP_NAME
              valueFrom:
                configMapKeyRef:
                  key: OVERLEAF_APP_NAME
                  name: sharelatex-variables
            - name: OVERLEAF_MONGO_URL
              valueFrom:
                configMapKeyRef:
                  key: OVERLEAF_MONGO_URL
                  name: sharelatex-variables
            - name: OVERLEAF_REDIS_HOST
              valueFrom:
                configMapKeyRef:
                  key: OVERLEAF_REDIS_HOST
                  name: sharelatex-variables
            - name: OVERLEAF_INVITE_TOKEN_SECRET
              value: "VFADRr67o9R2zDKV03+IFo4ykyK4WMnGe3q/xK7/fjY="
            - name: REDIS_HOST
              valueFrom:
                configMapKeyRef:
                  key: REDIS_HOST
                  name: sharelatex-variables
            - name: REDIS_PORT
              valueFrom:
                configMapKeyRef:
                  key: REDIS_PORT
                  name: sharelatex-variables
            - name: V1_HISTORY_URL
              value: http://sharelatex:3100/api
          image: harbor.reymota.es/overleaf/sharelatex:tex-12-cep
          imagePullPolicy: IfNotPresent
          name: overleaf
#          securityContext:
#            allowPrivilegeEscalation: false
#            capabilities:
#              drop:
#                - ALL
#            privileged: false
#            readOnlyRootFilesystem: true
#            seLinuxOptions: {}
#            seccompProfile:
#              type: RuntimeDefault
#            runAsUser: 0
#            runAsGroup: 0
#            runAsNonRoot: true
          ports:
            - containerPort: 80
              protocol: TCP
          volumeMounts:
            - mountPath: /var/lib/overleaf
              name: overleaf-data
      securityContext:
        fsGroup: 65534
#        fsGroupChangePolicy: Always
        runAsUser: 0
        runAsGroup: 0
      imagePullSecrets:
      - name: myregistrykey
      restartPolicy: Always
      terminationGracePeriodSeconds: 60
      volumes:
        - name: overleaf-data
          persistentVolumeClaim:
            claimName: overleaf-data
