Advertisement
shinemic

sharelatex_overleaf_docker_compose

May 8th, 2024
1,333
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 6.20 KB | None | 0 0
  1. version: '2.2'
  2. services:
  3.     sharelatex:
  4.         restart: always
  5.         # Server Pro users:
  6.         # image: quay.io/sharelatex/sharelatex-pro
  7.         image: sharelatex/sharelatex
  8.         container_name: sharelatex
  9.         depends_on:
  10.             mongo:
  11.                 condition: service_healthy
  12.             redis:
  13.                 condition: service_started
  14.         ports:
  15.            - 9088:80
  16.         links:
  17.            - mongo
  18.             - redis
  19.         stop_grace_period: 60s
  20.         volumes:
  21.            - /data/volumes/sharelatex/sharelatex:/var/lib/sharelatex
  22.             ########################################################################
  23.             ####  Server Pro: Uncomment the following line to mount the docker  ####
  24.             ####             socket, required for Sibling Containers to work    ####
  25.             ########################################################################
  26.             # - /var/run/docker.sock:/var/run/docker.sock
  27.         environment:
  28.             SHARELATEX_APP_NAME: Datalab Overleaf CE
  29.  
  30.             SHARELATEX_MONGO_URL: mongodb://mongo/sharelatex
  31.  
  32.             # Same property, unfortunately with different names in
  33.             # different locations
  34.             SHARELATEX_REDIS_HOST: redis
  35.             REDIS_HOST: redis
  36.  
  37.             ENABLED_LINKED_FILE_TYPES: 'project_file,project_output_file'
  38.  
  39.             # Enables Thumbnail generation using ImageMagick
  40.             ENABLE_CONVERSIONS: 'true'
  41.  
  42.             # Disables email confirmation requirement
  43.             EMAIL_CONFIRMATION_DISABLED: 'true'
  44.  
  45.             # temporary fix for LuaLaTex compiles
  46.             # see https://github.com/overleaf/overleaf/issues/695
  47.             TEXMFVAR: /var/lib/sharelatex/tmp/texmf-var
  48.  
  49.             ## Set for SSL via nginx-proxy
  50.             #VIRTUAL_HOST: 103.112.212.22
  51.  
  52.             # SHARELATEX_SITE_URL: http://sharelatex.mydomain.com
  53.             # SHARELATEX_NAV_TITLE: Our ShareLaTeX Instance
  54.             # SHARELATEX_HEADER_IMAGE_URL: http://somewhere.com/mylogo.png
  55.             # SHARELATEX_ADMIN_EMAIL: support@it.com
  56.  
  57.             # SHARELATEX_LEFT_FOOTER: '[{"text": "Powered by <a href=\"https://www.sharelatex.com\">ShareLaTeX</a> 2016"},{"text": "Another page I want to link to can be found <a href=\"here\">here</a>"} ]'
  58.             # SHARELATEX_RIGHT_FOOTER: '[{"text": "Hello I am on the Right"} ]'
  59.  
  60.             # SHARELATEX_EMAIL_FROM_ADDRESS: "team@sharelatex.com"
  61.  
  62.             # SHARELATEX_EMAIL_AWS_SES_ACCESS_KEY_ID:
  63.             # SHARELATEX_EMAIL_AWS_SES_SECRET_KEY:
  64.  
  65.             # SHARELATEX_EMAIL_SMTP_HOST: smtp.mydomain.com
  66.             # SHARELATEX_EMAIL_SMTP_PORT: 587
  67.             # SHARELATEX_EMAIL_SMTP_SECURE: false
  68.             # SHARELATEX_EMAIL_SMTP_USER:
  69.             # SHARELATEX_EMAIL_SMTP_PASS:
  70.             # SHARELATEX_EMAIL_SMTP_TLS_REJECT_UNAUTH: true
  71.             # SHARELATEX_EMAIL_SMTP_IGNORE_TLS: false
  72.             # SHARELATEX_EMAIL_SMTP_NAME: '127.0.0.1'
  73.             # SHARELATEX_EMAIL_SMTP_LOGGER: true
  74.             # SHARELATEX_CUSTOM_EMAIL_FOOTER: "This system is run by department x"
  75.  
  76.             # ENABLE_CRON_RESOURCE_DELETION: true
  77.  
  78.             ################
  79.             ## Server Pro ##
  80.             ################
  81.  
  82.             # SANDBOXED_COMPILES: 'true'
  83.  
  84.             # SANDBOXED_COMPILES_SIBLING_CONTAINERS: 'true'
  85.             # SANDBOXED_COMPILES_HOST_DIR: '/var/sharelatex_data/data/compiles'
  86.  
  87.             # DOCKER_RUNNER: 'false'
  88.  
  89.             ## Works with test LDAP server shown at bottom of docker compose
  90.             # SHARELATEX_LDAP_URL: 'ldap://ldap:389'
  91.             # SHARELATEX_LDAP_SEARCH_BASE: 'ou=people,dc=planetexpress,dc=com'
  92.             # SHARELATEX_LDAP_SEARCH_FILTER: '(uid={{username}})'
  93.             # SHARELATEX_LDAP_BIND_DN: 'cn=admin,dc=planetexpress,dc=com'
  94.             # SHARELATEX_LDAP_BIND_CREDENTIALS: 'GoodNewsEveryone'
  95.             # SHARELATEX_LDAP_EMAIL_ATT: 'mail'
  96.             # SHARELATEX_LDAP_NAME_ATT: 'cn'
  97.             # SHARELATEX_LDAP_LAST_NAME_ATT: 'sn'
  98.             # SHARELATEX_LDAP_UPDATE_USER_DETAILS_ON_LOGIN: 'true'
  99.  
  100.             # SHARELATEX_TEMPLATES_USER_ID: "578773160210479700917ee5"
  101.             # SHARELATEX_NEW_PROJECT_TEMPLATE_LINKS: '[ {"name":"All Templates","url":"/templates/all"}]'
  102.  
  103.  
  104.             # SHARELATEX_PROXY_LEARN: "true"
  105.  
  106.     mongo:
  107.         restart: always
  108.         image: mongo:4.4
  109.         container_name: mongo
  110.         command: "--replSet overleaf"
  111.         expose:
  112.          - 27017
  113.         volumes:
  114.          - /data/volumes/sharelatex/mongo_data:/data/db
  115.         healthcheck:
  116.           test: echo 'db.stats().ok' | mongo localhost:27017/test --quiet
  117.           interval: 10s
  118.           timeout: 10s
  119.           retries: 5
  120.  
  121.     mongoinit:
  122.         image: mongo:4.4
  123.         # this container will exit after executing the command
  124.         restart: "no"
  125.         depends_on:
  126.           mongo:
  127.             condition: service_healthy
  128.         entrypoint:
  129.          [
  130.             "mongo",
  131.             "--host",
  132.             "mongo:27017",
  133.             "--eval",
  134.             'rs.initiate({ _id: "overleaf", members: [ { _id: 0, host: "mongo:27017" } ] })',
  135.           ]
  136.  
  137.     redis:
  138.         restart: always
  139.         image: redis:6.2
  140.         container_name: redis
  141.         expose:
  142.            - 6379
  143.         volumes:
  144.            - /data/volumes/sharelatex/redis_data:/data
  145.  
  146.     # ldap:
  147.     #    restart: always
  148.     #    image: rroemhild/test-openldap
  149.     #    container_name: ldap
  150.     #    expose:
  151.     #        - 389
  152.  
  153.     # See https://github.com/jwilder/nginx-proxy for documentation on how to configure the nginx-proxy container,
  154.     # and https://github.com/overleaf/overleaf/wiki/HTTPS-reverse-proxy-using-Nginx for an example of some recommended
  155.     # settings. We recommend using a properly managed nginx instance outside of the Overleaf Server Pro setup,
  156.     # but the example here can be used if you'd prefer to run everything with docker-compose
  157.  
  158.     # nginx-proxy:
  159.     #     image: jwilder/nginx-proxy
  160.     #     container_name: nginx-proxy
  161.     #     ports:
  162.     #       #- "80:80"
  163.     #       - "443:443"
  164.     #     volumes:
  165.     #       - /var/run/docker.sock:/tmp/docker.sock:ro
  166.     #       - /home/sharelatex/tmp:/etc/nginx/certs
  167.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement