Code Monkey home page Code Monkey logo

docker-image's Introduction


Overleaf

An open-source online real-time collaborative LaTeX editor.

WikiServer ProContributingMailing ListAuthorsLicense

A screenshot of a project being edited in Overleaf Community Edition

Figure 1: A screenshot of a project being edited in Overleaf Community Edition.

Community Edition

Overleaf is an open-source online real-time collaborative LaTeX editor. We run a hosted version at www.overleaf.com, but you can also run your own local version, and contribute to the development of Overleaf.

Enterprise

If you want help installing and maintaining Overleaf in your lab or workplace, we offer an officially supported version called Overleaf Server Pro. It also includes more features for security (SSO with LDAP or SAML), administration and collaboration (e.g. tracked changes). Find out more!

Keeping up to date

Sign up to the mailing list to get updates on Overleaf releases and development.

Installation

We have detailed installation instructions in the Overleaf Toolkit.

Upgrading

If you are upgrading from a previous version of Overleaf, please see the Release Notes section on the Wiki for all of the versions between your current version and the version you are upgrading to.

Overleaf Docker Image

This repo contains two dockerfiles, Dockerfile-base, which builds the sharelatex/sharelatex-base image, and Dockerfile which builds the sharelatex/sharelatex (or "community") image.

The Base image generally contains the basic dependencies like wget and aspell, plus texlive. We split this out because it's a pretty heavy set of dependencies, and it's nice to not have to rebuild all of that every time.

The sharelatex/sharelatex image extends the base image and adds the actual Overleaf code and services.

Use make build-base and make build-community from server-ce/ to build these images.

We use the Phusion base-image (which is extended by our base image) to provide us with a VM-like container in which to run the Overleaf services. Baseimage uses the runit service manager to manage services, and we add our init-scripts from the server-ce/runit folder.

Contributing

Please see the CONTRIBUTING file for information on contributing to the development of Overleaf.

Authors

The Overleaf Team

License

The code in this repository is released under the GNU AFFERO GENERAL PUBLIC LICENSE, version 3. A copy can be found in the LICENSE file.

Copyright (c) Overleaf, 2014-2024.

docker-image's People

Contributors

d-rickyy-b avatar das7pad avatar heukirne avatar jdleesmiller avatar mattcollier avatar mserranom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-image's Issues

Fatal error when trying to create admin user.

with mongod version 3.0.1 installed, and redis-server version 2.8.19 installed on the docker host, I get:

docker exec sharelatex /bin/bash -c "cd /var/www/sharelatex/web; grunt create-admin-user --email [email protected]"

Running "create-admin-user" task
Fatal error: driver is incompatible with this server version

It looks like your image is not compatible with mongod 3.0.1 (the latest stable version).

Which version of mongo is recommended?
Can it be fixed to work with 3.0.1?

Glossaries not working

Hi, I got the installation up and running, but using glossaries as I do on sharelatex.com does not work.

Are there any packages I have to install, or something else I need to configure?

I have runned the docker exec sharelatex tlmgr install scheme-full command already.

Thanks!

Enviroment variable SHARELATEX_EMAIL_SMTP_IGNORE_TLS has no effect

I'm trying to get e-mail working. When I try to add a new user in the Admin Panel im getting the following error:

web.log:{"name":"web-sharelatex","hostname":"30ced72e6a1c","pid":106,"level":50,"err":{"message":"DEPTH_ZERO_SELF_SIGNED_CERT","name":"Error","stack":"Error: DEPTH_ZERO_SELF_SIGNED_CERT\n at SecurePair. (tls.js:1429:32)\n at SecurePair.emit (events.js:92:17)\n at SecurePair.maybeInitFinished (tls.js:1028:10)\n at CleartextStream.read [as _read] (tls.js:520:13)\n at CleartextStream.Readable.read (_stream_readable.js:341:10)\n at EncryptedStream.write [as _write] (tls.js:417:25)\n at doWrite (_stream_writable.js:226:10)\n at writeOrBuffer (_stream_writable.js:216:5)\n at EncryptedStream.Writable.write (_stream_writable.js:183:11)\n at Socket.ondata (stream.js:51:26)\n at Socket.emit (events.js:95:17)\n at Socket. (stream_readable.js:765:14)\n at Socket.emit (events.js:92:17)\n at emitReadable (_stream_readable.js:427:10)\n at emitReadable (_stream_readable.js:423:5)\n at readableAddChunk (_stream_readable.js:166:9)\n at Socket.Readable.push (_stream_readable.js:128:10)\n at TCP.onread (net.js:529:21)\n"},"msg":"error sending message","time":"2016-11-06T12:49:07.020Z","v":0}

Obviously sharelatex is not happy with my self signed certificate. The mailserver is however on the same physical machine as sharelatex which is why I do not use any authentication or encryption. I tried to deactivate TLS by using the env variable SHARELATEX_EMAIL_SMTP_IGNORE_TLS, however the error stays the same. This is my docker-compose.yml file:

sharelatex:
  build: ./build/sharelatex
  links:
   - mongo
   - redis
  environment:
    SHARELATEX_SITE_URL: https://tex.example.com
    SHARELATEX_ADMIN_EMAIL: [email protected]
    SHARELATEX_MONGO_URL: mongodb://mongo/sharelatex
    SHARELATEX_REDIS_HOST: redis

    SHARELATEX_EMAIL_FROM_ADDRESS: [email protected]
    SHARELATEX_EMAIL_SMTP_HOST: example.com
    SHARELATEX_EMAIL_SMTP_PORT: 25
    SHARELATEX_EMAIL_SMTP_SECURE: "false"
    SHARELATEX_EMAIL_SMTP_IGNORE_TLS: "true"
  volumes:
   - ./volumes/sharelatex:/var/lib/sharelatex
mongo:
  image: mongo
  volumes:
   - ./volumes/mongo:/data/db
redis:
  image: redis
  command: "redis-server --appendonly yes"
  volumes:
   - ./volumes/redis:/data

I do not use example.com but my own domain ;-) I tried using a configuration as in the example docker-compose file but docker-compose fails with the following error:

ERROR: The Compose file './docker-compose.yml' is invalid because:
services.sharelatex.environment.SHARELATEX_EMAIL_SMTP_IGNORE_TLS contains true, which is an invalid type, it should be a string, number, or a null

I tried using the nodemailer manually in your docker-image and it worked, so my mail server is configured correctly. At this point I'm not sure where to go on with debugging and would appreciate any help.

SHARELATEX_MONGO_URL does not take effect

Hello. I am trying to run the sharelatex using the following docker-compose yml file.

sharelatex:
    container_name: latex
    restart: always
    links:
        - latex_redis:redis
        - latex_mongo:mongo
    environment:
        - SHARELATEX_MONGO_URL=mongodb://mongo/sharelatex
        - SHARELATEX_REDIS_HOST=redis
        - SHARELATEX_SITE_URL=http://pele.farmbio.uu.se/sharelatex
    ports:
        - 5000:80
    image: sharelatex/sharelatex

latex_redis:
    container_name: latex_redis
    restart: always
    command: redis-server --appendonly yes
    image: redis

latex_mongo:
    container_name: latex_mongo
    restart: always
    image: mongo

The problem is that setting SHARELATEX_SITE_URL does not take effect, so the base url of the autogenerated links it is always the hostname of the machine where I am running docker. Is this a bug, or am I missing something?

Backing up, and restoring from backup

The readme got me started, but left me with a couple of questions:
How do I backup all my sharelatex projects?
If something goes wrong, how do I restore from backup?

Thanks.

Simply lost - migration from 0.14 github to docker?

Hi,

I have sharelatex installed on debian jessie server.
I installed using a direct pull from the github.

Pretty happy about. I have written my PhD with it :-).

However managing it, for a more or less noob as myself, is/was not all to straight forward.

So now, a new version....

What do I have to do to properly migrate from 0.14 (github pull) to a docker instance? Do I simply follow the instructions or do I need to take care of other thing.

The server is only accessible on two ports. Sharelatex was on gate 80, whilst nginx helps to move all trafic (redis and mongo and so) to the necessary port.

How do I tackle that with a docker system?

Latex packages not found

I'm running sharelatex:latest along with mongo:2.6.9 and redis:latest with docker-compose. Everything is pretty good, but some packages that are supposed to come with Sharelatex (at least available on www.sharelatex.com) appear to be missing.

For instance, try to compile \usepackage{lineno} and I get the following error:

LaTeX Error: File `lineno.sty' not found.

Type X to quit or to proceed,
or enter new name. (Default extension: sty)

Enter file name:
! Emergency stop.
<read *>

l.8 \usepackage
{fixmetodonotes}^^M
*** (cannot \read from terminal in nonstop modes)

Any idea on how to fix this?

issues with ssl

I have sharelatex up and running (when the firewalls are down you can get to the sharelatex services fine though port 5000) and I have a working instance of nginx on the host machine that is successfully using SSL. My only problem now is there seems to be an issue between the nginx communications within the docker container and the nginx instance i'm running on the host machine.

I'm getting this error on the browser
400 Bad Request

nginx/1.4.6 (Ubuntu)

and this error on the nginx service inside the container
"2016/01/29 15:45:24 [error] 89#0: *65 connect() failed (111: Connection refused) while connecting to upstream, client: 172.17.0.1, server: _, request: "GET / HTTP/1.1", upstream: "http://[::1]:3000/", host: "hostname.com:5000""

This is my host machine nginx sharelatex.conf file
server {
listen 443;
server_name _; # Catch all, see http://nginx.org/en/docs/http/server_names.html

ssl on;
ssl_certificate /etc/ssl/certs/cirt.crt;
ssl_certificate_key /etc/ssl/keys/key.key;
#set $static_path /var/www/sharelatex/web/public;

location / {
    proxy_pass http://localhost:5000;
    proxy_set_header Host $http_x_forwarded_host;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_read_timeout 3m;
    proxy_send_timeout 3m;
}

location /socket.io {
    proxy_pass http://localhost:3026;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header Host $http_x_forwarded_host;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_read_timeout 3m;
    proxy_send_timeout 3m;
}

}

Any suggestions are welcome.
Thanks,

Setup mail when using docker image

Hi,

I installed the docker image according the the instructions given on https://github.com/sharelatex/sharelatex-docker-image, but it does not seem able to send out any emails from within the docker container.
Maybe i missed the hint on how to configure the outgoing mail connection. Can somebody with a little more insight point me to the instructions that apply to the docker version of sharelatex?

Thanks.
bajo

SQLITE_CANTOPEN: unable to open database file

Hi there,

I am trying to run ShareLaTeX via LXC and followed all steps mentioned in the Dockerfile. But when I start all services I get the following error:

{"name":"clsi","hostname":"dbbf324cf0046ad","pid":15623,"level":30,"msg":"CLSI starting up, listening on localhost:3013","time":"2015-12-08T08:10:32.758Z","v":0}
Unhandled rejection SequelizeConnectionError: SQLITE_CANTOPEN: unable to open database file
    at Database.<anonymous> (/var/www/clsi/node_modules/sequelize/lib/dialects/sqlite/connection-manager.js:38:59)

I can register at localhost:3000 and open/create an example project but it doesn't compile:

{"name":"clsi","hostname":"dbbf324cf0046ad","pid":15623,"level":50,"err":{"message":"SQLITE_CANTOPEN: unable to open database file","name":"SequelizeConnectionError","stack":"SequelizeConnectionError: SQLITE_CANTOPEN: unable to open database file\n    at Database.<anonymous> (/var/www/clsi/node_modules/sequelize/lib/dialects/sqlite/connection-manager.js:38:59)","parent":{"errno":14,"code":"SQLITE_CANTOPEN"},"original":"[Circular]"},"msg":"server error","time":"2015-12-08T08:12:46.558Z","v":0}
{"name":"clsi","hostname":"dbbf324cf0046ad","pid":15623,"level":30,"req":{"url":"/project/56668720fdf03da00d27157b/compile","method":"POST","remote-addr":"127.0.0.1","content-length":"1391"},"res":{"statusCode":500},"response-time":5,"msg":"http request","time":"2015-12-08T08:12:46.561Z","v":0}
{"name":"web-sharelatex","hostname":"dbbf324cf0046ad","pid":15629,"level":50,"err":{"message":"CLSI returned non-success code: 500","name":"Error","stack":"Error: CLSI returned non-success code: 500\n  at Request._callback (/var/www/web/app/js/Features/Compile/ClsiManager.js:88:19)\n  at Request.self.callback (/var/www/web/node_modules/request/request.js:121:22)\n  at Request.emit (events.js:98:17)\n  at Request.<anonymous> (/var/www/web/node_modules/request/request.js:978:14)\n  at Request.emit (events.js:117:20)\n  at IncomingMessage.<anonymous> (/var/www/web/node_modules/request/request.js:929:12)\n  at IncomingMessage.emit (events.js:117:20)\n  at _stream_readable.js:944:16\n  at process._tickDomainCallback (node.js:492:13)\n"},"project_id":"56668720fdf03da00d27157b","msg":"CLSI returned failure code","time":"2015-12-08T08:12:46.564Z","v":0}
{"name":"web-sharelatex","hostname":"dbbf324cf0046ad","pid":15629,"level":50,"err":{"message":"CLSI returned non-success code: 500","name":"Error","stack":"Error: CLSI returned non-success code: 500\n  at Request._callback (/var/www/web/app/js/Features/Compile/ClsiManager.js:88:19)\n  at Request.self.callback (/var/www/web/node_modules/request/request.js:121:22)\n  at Request.emit (events.js:98:17)\n  at Request.<anonymous> (/var/www/web/node_modules/request/request.js:978:14)\n  at Request.emit (events.js:117:20)\n  at IncomingMessage.<anonymous> (/var/www/web/node_modules/request/request.js:929:12)\n  at IncomingMessage.emit (events.js:117:20)\n  at _stream_readable.js:944:16\n  at process._tickDomainCallback (node.js:492:13)\n"},"url":"/project/56668720fdf03da00d27157b/compile","method":"POST","msg":"error passed to top level next middlewear","time":"2015-12-08T08:12:46.564Z","v":0}
{"name":"web-sharelatex","hostname":"dbbf324cf0046ad","pid":15629,"level":30,"req":{"url":"/project/56668720fdf03da00d27157b/compile","method":"POST","referrer":"http://localhost:3000/project/56668720fdf03da00d27157b","remote-addr":"127.0.0.1","user-agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/45.0.2454.101 Chrome/45.0.2454.101 Safari/537.36","content-length":"88"},"res":{"statusCode":500},"response-time":61,"msg":"http request","time":"2015-12-08T08:12:46.566Z","v":0}

Public projects are not public

When someone opens the URL of a public project, they're still prompted for their credentials. This is an issue in the web component, discussed here: overleaf/web#367

The solution is to edit a config file and restart Sharelatex, but that doesn't apply in the case of a Docker container. Ideally it should be an option specified in the Dockerfile.

What is the recommended way of dealing with it?

Error on account activation

I installed sharelatex with the docker-image and got mail working. If I add a new user in the admin panel a mail with the password reset link is send as it should be. However, when users try to set their passwords, they get the following error:

Your activation token has expired, you will need to get another one sent to you.

This happens immediately after sending the mail and not as described in the admin backend after one week.

502 Error

When trying to install share latex via docker I get a 502 error from nginx.
I use the command as suggested:
docker run -d
-v ~/sharelatex_data:/var/lib/sharelatex
-p 5000:80
--name=sharelatex
sharelatex/sharelatex

As I am also running an apache server on the same machine I guess nginx included in the docker image is listening on port 80 and not 5000...

Fedora version and docker-compose

Using phusion is very bloated and tries to be a VM which defeats the purpose of Docker. Also it is not possible to debug with docker run -ti --rm sharelatex bash because an init script takes over, which makes Docker harder to use rather than easier.

There are many bugs in this repo, e.g. 98_check_db_access.sh is never executed.

Question

If I make a Fedora based version with docker-compose.yml which would make the wiki page obsolete about installing, configuring, and running. Would you then make it upstream?

The following repo is an example made for v0.0.2, so I would make it general purpose if you will make it upsteam.

https://github.com/dtu-compute/docker-sharelatex-fedora

Still having issues with special fonts

Hi,
this error exists for a long time, and I fixed it in one of my pull requests, but it was incorporated again into newer docker images.

If I am using for example

\RequirePackage[clock]{ifsym}
\Interval %timer symbol

it exits withh error that font does not exist.

A simple chown will get rid of that issue:

chown www-data:www-data /var/www/

/var/www/sharelatex/web doesn't exist

Hi, I followed the instructions as shown in the wiki and the sharelatex is up and running and can be accessed remotely. However, when I try to create the admin account:

docker exec sharelatex /bin/bash -c "cd /var/www/sharelatex/web; grunt create-admin-user --email [email protected]"

I get:

/bin/bash: line 0: cd: /var/www/sharelatex/web: No such file or directory

When I run:

docker exec sharelatex /bin/bash -c "ls /var/www/"

I get:

css
index.html
js
mydropbox
nginx-default
sample_page.html
widget_schedule.html
widgets.html

Anyone can help me? It's frustrating... It's like I'm almost there, but I lost the key...

>docker info
Containers: 1
Images: 52
Server Version: 1.9.0
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 54
 Dirperm1 Supported: false
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 3.2.0-4-amd64
Operating System: Debian GNU/Linux 7 (wheezy)

Protected Mongo breaks edition

I spent a long time to understand why #59 appears for me and looking at logs I just discovered why.

Actually, I tried to start ShareLatex on an OpenShift cluster (OSE - local cloud). OpenShift provides a persistent Mongo template that needs to set user and password to mongodb.

So that, if we provide "mongo://user:password@mongodb/sharelatex" to mongo url env var for Sharelatex, everything works excepting loading document in editor. See #59 (comment):

{"name":"documentupdater","hostname":"sharelatex-1-y7xo3","pid":153,"level":50,"err":{"message":"auth failed","name":"MongoError","stack":"MongoError: auth failed\n  at Object.toError (/var/www/sharelatex/document-updater/node_modules/mongojs/node_modules/mongodb/lib/mongodb/utils.js:110:11)\n  at /var/www/sharelatex/document-updater/node_modules/mongojs/node_modules/mongodb/lib/mongodb/auth/mongodb_cr.js:34:33\n  at /var/www/sharelatex/document-updater/node_modules/mongojs/node_modules/mongodb/lib/mongodb/db.js:1670:9\n  at Server.Base._callHandler (/var/www/sharelatex/document-updater/node_modules/mongojs/node_modules/mongodb/lib/mongodb/connection/base.js:382:41)\n  at /var/www/sharelatex/document-updater/node_modules/mongojs/node_modules/mongodb/lib/mongodb/connection/server.js:472:18\n  at [object Object].MongoReply.parseBody (/var/www/sharelatex/document-updater/node_modules/mongojs/node_modules/mongodb/lib/mongodb/responses/mongo_reply.js:68:5)\n  at [object Object].<anonymous> (/var/www/sharelatex/document-updater/node_modules/mongojs/node_modules/mongodb/lib/mongodb/connection/server.js:430:20)\n  at [object Object].emit (events.js:95:17)\n  at [object Object].<anonymous> (/var/www/sharelatex/document-updater/node_modules/mongojs/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:191:13)\n  at [object Object].emit (events.js:98:17)\n  at Socket.<anonymous> (/var/www/sharelatex/document-updater/node_modules/mongojs/node_modules/mongodb/lib/mongodb/connection/connection.js:384:22)\n  at Socket.emit (events.js:95:17)\n  at Socket.<anonymous> (_stream_readable.js:765:14)\n  at Socket.emit (events.js:92:17)\n  at emitReadable_ (_stream_readable.js:427:10)\n  at emitReadable (_stream_readable.js:423:5)\n  at readableAddChunk (_stream_readable.js:166:9)\n  at Socket.Readable.push (_stream_readable.js:128:10)\n  at TCP.onread (net.js:529:21)\n","ok":0,"errmsg":"auth failed","code":18},"msg":"request errored","time":"2017-01-18T11:42:20.598Z","v":0}

So I recreated a mongo docker container without any authentication, and then ShareLatex can now open documents in editor.

That means that document updater want to connect to mongo without any auth, or to something else that the provided authorized database (sharelatex in my example).

Configure nginx to add both SSL and basic authentification supports

Hi,

I would like to add both SSL support and basic authentication into my ShareLatex docker container.

Here is my sharelatex.conf with modifications to support SSL and basic authentication.

        listen         443;
        server_name    localhost; 

        ssl on;
        ssl_certificate /etc/nginx/ssl/localhost.crt;
        ssl_certificate_key /etc/nginx/ssl/localhost.key;

        set $static_path /var/www/sharelatex/web/public;

        location / {
                auth_basic "You need to log in";
                auth_basic_user_file /etc/nginx/htpasswd/sharelatex.passwd;
                proxy_pass http://localhost:3000;
                ...
        }
...

SSL support is working, but when i want to add a basic authentication is not working.

Do you think my configuration is ok ?

Any idea about my problem ?

Thanks

Mickael

Nginx Proxy to a path other than /

Been trying to use the container behind nginx proxy.

Describes the case where sharelatex resides at the root path of the server. It seems like some redirects assume that sharelatex is sitting at the root of the server, even when proxied according to

https://github.com/sharelatex/sharelatex/wiki/HTTPS-reverse-proxy-using-Nginx

I'm not using the SSL part of the config. I've set up configs to include a path:

siteUrl : 'http://pogy.ern.nps.edu/latex'
behindProxy: true
apis:
    web:
       url: "http://localhost:3000/latex"

but the first visit to
http://pogy.ern.nps.edu/latex
ends me up at
http://pogy.ern.nps.edu/login
instead of
http://pogy.ern.nps.edu/latex/login

I don't see any obvious way to handle this in the Nginx config (but I'm no nginx master), and the available configs for sharelatex don't seem to give any other places to state the path.

Any clue?

SHARELATEX_APP_NAME env var does not work

I changed the variable while running container as such:

docker run -i --rm -P -p 8090:80 -v /opt/sharelatex --env SHARELATEX_APP_NAME="My cool sharelatex" --env SHARELATEX_ADMIN_EMAIL="[email protected]" --env SHARELATEX_MONGO_URL=mongod    b://mongo/sharelatex --env SHARELATEX_REDIS_HOST=redis --link $MONGO_CONTAINER_NAME:mongo --link $REDIS_CONTAINER_NAME:redis --name sharelatex sharelatex/sharelatex

Though it didn't change anything =\

Squash RUN commands to reduce image size

Docker's aufs means that each command in the Dockerfile adds another layer to the final image. When we start by installing all of the build dependencies, those files will persist straight through. Any rm command that is in its own command will not free up any space from the resultant image. This probably isn't a priority, but it might be nice to reduce bandwidth and disk space used by the image by combining some of the RUN command with &&. We can even recover a little space by adding something like apt-get clean && rm -rf /tmp/* /var/lib/apt/lists/* to the end of any stanza where we use apt-get.

“Error opening document”when i open a project

i have just finished the installation of docker image.
But when i open the project,it shows "Server Error Sorry, something went wrong and your project could not be compiled. Please try again in a few moments"
and the edition part in the left keep“loading...”
i guess it may be the problem of database,mongodb or redis.
because i met the problem before i successfully created a new admin user.It was the cause of mongo version.I run the mongodb of 3.0.And i solve it by "Go into /var/www/sharelatex/web and change the version of mongoose to 3.8.27 in your package.json and run npm install." ,which is the solution from @ipsq
So ,what can i do? Should i change re install the mongodb or redis?

Error: CERT_UNTRUSTED on user invite

For reference, the run command used:

docker run -d  -v ~/sharelatex_data:/var/lib/sharelatex  -p 5001:80  --name=sharelatex_latest  --env SHARELATEX_EMAIL_SMTP_HOST=some.ip.to.smtp  --env [email protected]  --env SHARELATEX_EMAIL_SMTP_PORT=25  --env SHARELATEX_EMAIL_SMTP_SECURE=false  --env SHARELATEX_EMAIL_SMTP_IGNORE_TLS=true  --env SHARELATEX_EMAIL_SMTP_TLS_REJECT_UNAUTH=false some/label:sharelatex_latest

When inviting a user from the "Share Project" form, I get the following error in the web.log.

{"name":"web-sharelatex","hostname":"80e4963b4f6c","pid":1133,"level":30,"req":{"url":"/user/contacts","method":"GET","referrer":"http://our.sharelatex:5001/project/57ff90f1a0a95d5d009c10a4","remote-addr":"127.0.0.1","user-agent":"Mozilla/5
.0 (Windows NT 6.1; WOW64; rv:48.0) Gecko/20100101 Firefox/48.0"},"res":{"statusCode":500},"response-time":486,"msg":"http request","time":"2016-10-14T07:31:27.320Z","v":0}
{"name":"web-sharelatex","hostname":"80e4963b4f6c","pid":1133,"level":30,"user_id":"57a8876d64104aa400a26ead","project_id":"57ff90f1a0a95d5d009c10a4","msg":"allowing user admin access to project","time":"2016-10-14T07:31:28.244Z","v":0
}
{"name":"web-sharelatex","hostname":"80e4963b4f6c","pid":1133,"level":30,"projectId":"57ff90f1a0a95d5d009c10a4","inviteId":"57ffaa9ca0a95d5d009c10a9","msg":"resending invite","time":"2016-10-14T07:31:28.244Z","v":0}
{"name":"web-sharelatex","hostname":"80e4963b4f6c","pid":1133,"level":30,"projectId":"57ff90f1a0a95d5d009c10a4","inviteId":"57ffaa9ca0a95d5d009c10a9","msg":"resending invite email","time":"2016-10-14T07:31:28.245Z","v":0}
{"name":"web-sharelatex","hostname":"80e4963b4f6c","pid":1133,"level":30,"projectId":"57ff90f1a0a95d5d009c10a4","inviteId":"57ffaa9ca0a95d5d009c10a9","msg":"sending notification and email for invite","time":"2016-10-14T07:31:28.251Z","
v":0}
{"name":"web-sharelatex","hostname":"80e4963b4f6c","pid":1133,"level":30,"receiver":"[email protected]","subject":"project1 - shared by [email protected]","msg":"sending email","time":"2016-10-14T07:31:28.274Z","v
":0}
{"name":"web-sharelatex","hostname":"80e4963b4f6c","pid":1133,"level":50,"err":{"message":"CERT_UNTRUSTED","name":"Error","stack":"Error: CERT_UNTRUSTED\n  at SecurePair.<anonymous> (tls.js:1381:32)\n  at SecurePair.emit (events.js:92:
17)\n  at SecurePair.maybeInitFinished (tls.js:980:10)\n  at CleartextStream.read [as _read] (tls.js:472:13)\n  at CleartextStream.Readable.read (_stream_readable.js:341:10)\n  at EncryptedStream.write [as _write] (tls.js:369:25)\n  at
 doWrite (_stream_writable.js:226:10)\n  at writeOrBuffer (_stream_writable.js:216:5)\n  at EncryptedStream.Writable.write (_stream_writable.js:183:11)\n  at Socket.ondata (stream.js:51:26)\n  at Socket.emit (events.js:95:17)\n  at Soc
ket.<anonymous> (_stream_readable.js:765:14)\n  at Socket.emit (events.js:92:17)\n  at emitReadable_ (_stream_readable.js:427:10)\n  at emitReadable (_stream_readable.js:423:5)\n  at readableAddChunk (_stream_readable.js:166:9)\n  at S
ocket.Readable.push (_stream_readable.js:128:10)\n  at TCP.onread (net.js:529:21)\n"},"msg":"error sending message","time":"2016-10-14T07:31:28.367Z","v":0}

I already tried

npm config set strict-ssl false
npm config set ca null

as per some comments found by searching for CERT_UNTRUSTED. Since we are in a safe LAN. Any hints?

nginx intermittent failures if IPv6 not enabled on the machine

I experienced intermittent failures of the nginx server using the docker image on a RHEL7.1 virtual machine. Every second refresh led to "internal server error 500".

Seems this was due to IPv6 not being enabled on the machine. It was solvable through switching out "localhost" to IPv4 address "127.0.0.1" inside the docker image nginx conf.
Otherwise it was resolved to [::1] which was not understood by nginx (logs print "socket() failed (address family not supported by protocol)").

I'm no expert, but perhaps it's better to just use this IPv4 address from the start?

migrating from 0.14 github to 0.2 docker

Hi,
I'm using a sharelatex server setup on debian jessie.
I used 0.14 from github.
Now I wanted to update to docker to get the newer version as well as making maintenance of the setup easier.

I used this script:
docker run -d \ -v /:/var/lib/sharelatex \ --env SHARELATEX_MONGO_URL=mongodb://dockerhost/sharelatex \ --env SHARELATEX_REDIS_HOST=redis://dockerhost/sharelatex \ --env SHARELATEX_SITE_URL=http://localhost:5000 \ -p 5000:80 \ --name=sharelatex \ sharelatex/sharelatex

In short, I had stored data from sharelatex in /var/lib/sharelatex (so why change it?), as some backup stuff were already running on this folder.
I wanted to use the same mongodb and redis setup, as before, so I set mongo_url and redis_host to dockerhost. (not sure if this is correct).
then i set the url to localhost:5000 and port 5000:80. But here things get a bit fuzy for me, which ports are what?

As the server has only limited open ports, i have to move it behind a proxy. I use nginx with the config (for the 0.14 github setup).

` client_max_body_size 50M;
set $static_path /opt/sharelatex/web/public;

    location / {
            proxy_pass http://localhost:3000;
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_set_header Host $http_x_forwarded_host;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_read_timeout 3m;
            proxy_send_timeout 3m;
    }

    location /socket.io {
            proxy_pass http://localhost:3026;
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_set_header Host $http_x_forwarded_host;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_read_timeout 3m;
            proxy_send_timeout 3m;
    }

    location /stylesheets {
            expires 1y;
            root $static_path/;
    }

    location /minjs {
            expires 1y;
            root $static_path/;
    }

    location /img {
            expires 1y;
            root $static_path/;
    }

`

And things don't work... The thing is also quiet a black box for me... I don't see output, if the script could run or not.

as texlive 2015 is installed on the dockerhost, I would like to use that installation rather then a new setup inside the docker( how it normally works, as far as i understood). any help?

@henryoswald

Upload File Size

I cannot upload files bigger than 1024KB! How can I change that in a short term? Images are often bigger than 1MB.
Please make the max upload size configurable.

Error opening document

I did all the setup correctly and mongo migration is working and redis is also connected. However, I still got this error when trying to open an document,

Error opening document
Sorry, something went wrong opening this document. Please try again.

Is there a way to debug this or has anyone seen this who has a solution? Thanks.

Missing dependency and db file

I think that there is a missing dependency on the OS - sqlite. I installed docker, mongo etc on a fresh Ubuntu 16.04 and got the following error:

*** Killing all processes... *** Running /etc/my_init.d/00_make_sharelatex_data_dirs.sh... chown: cannot access ‘/var/lib/sharelatex/data/db.sqlite’: No such file or directory *** /etc/my_init.d/00_make_sharelatex_data_dirs.sh failed with status 1

Even after installing sqlite this error would appear. I created an empty file in the right location and restarted and it worked.

My DockerFile : no loading Project

Hello,

With my Dockerfile, sharelatex container isn't loading the project.

Have you an idea ?
`
FROM sharelatex/sharelatex:latest

MAINTAINER f c [email protected]

ENV http_proxy http://proxy.univ-.fr:3128/
ENV https_proxy http://proxy.univ-.fr:3128/

RUN apt-get update && apt-get -y upgrade

RUN apt-get install -y --reinstall texlive-base

RUN apt-get install -y texlive-full

RUN rm -rf /var/lib/apt/lists/*

COPY ./settings.defaults.coffee /var/www/sharelatex/web/config/
`
THX

tlmgr: not found

The error '/bin/sh: 1: tlmgr: not found' is given at the line:

RUN tlmgr install latexmk

I assume that this comes as part of the texlive install and it's probably an issue with the PATH variable, but I don't know what to append to 'ENV PATH ...' to fix it.

Thanks

Metric (TFM) file not found

Hello,

I have successfully installed all the components running the following:

$ docker run -d --name sharemongo mongo:2.6
$ docker run -d --name shareredis redis:latest
$ docker run -d -P -p 5000:80 -v /opt/sharelatex --env SHARELATEX_MONGO_URL=mongodb://mongo/sharelatex --env SHARELATEX_REDIS_HOST=redis --link sharemongo:mongo --link shareredis:redis --name sharelatex sharelatex/sharelatex

Then I created an administrator user as mentioned in README and installed full TeX Live:

$ docker exec sharelatex tlmgr install scheme-full

After it I created a new project:

\documentclass{article}
\usepackage[russian]{babel}

\begin{document}
Привет, мир!
\end{document}

But unfortunately I am getting an error that the TFM file could not be found. Log contains warnings, but adding fontenc and inputenc obviously does not help.

I think it might be connected with this issue. How do you think?

docker pull error on RHEL 6.4

I'm new to docker & sharelatex. I have install docker on RHEL 6.4 server, but when I try to pull the image it give following errors after pulling some layers.

[root@localhost ~]# docker pull sharelatex/sharelatex
latest: Pulling from sharelatex/sharelatex
50b6c614471e: Pulling fs layer 
660935bea306: Pulling fs layer 
43ad54186ea5: Pulling fs layer 
f81ee0908355: Pulling fs layer 
e333265f7b46: Pulling fs layer 
39b535db15aa: Pulling fs layer 
d90e5521a089: Pulling fs layer 
fadca84fbb4e: Pulling fs layer 
46c4e20a0b25: Pulling fs layer 
e4694786302b: Pulling fs layer 
8145d5f22e47: Pulling fs layer 
eea48d32be8b: Pulling fs layer 
79e1c590a5ae: Pulling fs layer 
e07083a73188: Pulling fs layer 
a3dbdb6636d0: Pulling fs layer 
01cc8d76f063: Pulling fs layer 
48f9397ab1c9: Pulling fs layer 
ff0400706821: Pulling fs layer 
8e3879b77b98: Pulling fs layer 
e0c0b7c12d4f: Pulling fs layer 
cc150e49d0cd: Pulling fs layer 
42abf1478b6e: Pulling fs layer 
b7c00a7f1ff4: Pulling fs layer 
2083915bb50f: Pulling fs layer 
4b6fc4a76e46: Pulling fs layer 
9eaf241c32d7: Pulling fs layer 
155b2d093c99: Pulling fs layer 
98283540b364: Pulling fs layer 
fb3727eb0c6c: Pulling fs layer 
a483562f6a5d: Pulling fs layer 
806aeeda9082: Pulling fs layer 
8e170ff850f3: Pulling fs layer 
cc81220647fc: Pulling fs layer 
09fb27abb5cc: Pulling fs layer 
f8219186611f: Pulling fs layer 
50b6c614471e: Extracting [==>                                                ]  11.7 MB/247.2 MB
f8219186611f: Error pulling image (latest) from sharelatex/sharelatex, ApplyLayer exit status 1 stdout:  stderr: mkdir /root/.npm/formatio/1.0.2/package: invalid argument pm/formatio/1.0.2/package: invalid argument 
837339b91538: Download complete 
615c102e2290: Download complete 
b39b81afc8ca: Download complete 
8254ff58b098: Download complete 
ec5f59360a64: Download complete 
2ce4ac388730: Download complete 
2eccda511755: Download complete 
5a14c1498ff4: Download complete 
0f00182cb39a: Download complete 
a01580930e0a: Download complete 
93681fd225d0: Download complete 
6217ecb8f8db: Download complete 
6404a6dac084: Download complete 
9a024445981f: Download complete 
1923fcf354eb: Download complete 
Error pulling image (latest) from sharelatex/sharelatex, ApplyLayer exit status 1 stdout:  stderr: mkdir /root/.npm/formatio/1.0.2/package: invalid argument

I wonder if this error is related to sharelatex-docker-image, because I 've pull other images success:

[root@localhost ~]# docker pull ubuntu
latest: Pulling from ubuntu
9377ad319b00: Pull complete 
a82f81f25750: Pull complete 
b207c06aba70: Pull complete 
d55e68e6cc9c: Pull complete 
ubuntu:latest: The image you are pulling has been verified. Important: image verification is a tech preview feature and should not be relied on to provide security.
Digest: sha256:a2b67b6107aa640044c25a03b9e06e2a2d48c95be6ac17fb1a387e75eebafd7c
Status: Downloaded newer image for ubuntu:latest
[root@localhost ~]# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
ubuntu              latest              d55e68e6cc9c        2 weeks ago         187.9 MB
<none>              <none>              1923fcf354eb        9 months ago        471.9 MB

I'v tried several times, but it all fails on pulling f8219186611f layer. I've also tried on ubuntu 14.04, and has no problem. Does anyone have any suggestions or idea about this ?

SSL using Let's Encrypt

Hi,

I'm running Sharelatex on an AWS EC2 instance next to an Apache2 server which allows https using a "Let's Encrypt" certificate.

I am not very experienced with Nginx and even less so with docker. Under my circumstances, what's the easiest way to get a secure connection to Sharelatex?

Also, I'm sorry if that's not the right place to ask that question..

upload binary files bigger than 2 MB

It seems that the current configuration of nginx does not allow to upload binary files such as images or PDF. A solution could be to add the following line to nginx.conf to increase the maximum allowed upload size:

client_max_body_size 8m;

Take a look at this commit:

punkt2@906a414

not able to create users and errors in web.log

Hi
i'm not able to create users (emails are not sent, if i use the provided link it doesn't work) and i've got that error on my web.log.

Are these issues related to the same problem?

Exception: Error: failed to connect to [dockerhost:27017]
at [object Object]. (/var/www/sharelatex/web/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/server.js:553:74)
at [object Object].emit (events.js:106:17)
at [object Object]. (/var/www/sharelatex/web/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:140:15)
at [object Object].emit (events.js:98:17)
at Socket. (/var/www/sharelatex/web/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/connection.js:512:10)
at Socket.emit (events.js:95:17)
at net.js:441:14
at process._tickDomainCallback (node.js:492:13)

Starting the container fails

When I try to start the container it fails with the following message:

*** Running /etc/my_init.d/00_make_sharelatex_data_dirs.sh...
*** Running /etc/my_init.d/00_regen_sharelatex_secrets.sh...
*** Running /etc/my_init.d/00_regen_ssh_host_keys.sh...
*** Running /etc/my_init.d/00_set_docker_host_ipaddress.sh...
/etc/my_init.d/00_set_docker_host_ipaddress.sh: 3: /etc/my_init.d/00_set_docker_host_ipaddress.sh: cannot create /etc/hosts: Read-only file system
*** /etc/my_init.d/00_set_docker_host_ipaddress.sh failed with status 2

*** Killing all processes...

add shell-escape in comunity edition

Hello

Is there a way to tell pdflatex to use -shel-escape options ? I tried to change the LatexCompiler options in source but, even if I restart container, the option won't be use (using minted says that the option is not set)

Thanks

Opening project hangs on loading (Socket.io and anti virus?)

Hi,

I have installed sharelatex using docker and everything works fine, except on the machines that have for example TrendMicro OfficeScan installed. On those machines opening projects hangs on loading screen. Javascript console output can be seen on the attached image.
eb244b

I assume the problem occurs because of socket.io being blocked by anti virus, however on sharelatex.com everything works. So, I wonder what could be the difference. Also when I run on port 3000 for example, then again, it seems to work.

Is there any workaround to this?

Language settings

Hello,

First, let me thank you for developing Sharelatex and releasing it as an open source project.
I really enjoy using the project and we used it for a paper we just submitted.

I am running sharelatex as a docker container, but I can't seem to figure out how to fix some language issues.
For the first paper, everything worked. The paper was in english, so there was no issues.
For the second paper (in brazilian portuguese), I am having all kinds of issues. :-)

For instance:
"Departamento de Informática e Estatística"
becomes (when rendered and from files uploaded)
"Departamento de Inform�tica e Estat�stica",

latex seems to think that some words are math expressions ("Missing $ inserted"), etc.

I've tried two things so far:
1 - updating locales on the sharelatex docker OS (docker exec -it sharelatex /bin/bash and then updating ubuntu's locales with locale-gen "pt_BR.UTF-8" and dpkg-reconfigure locales).
2 - changing fontenc and inputenc on the document.

So far, no luck. :-)
Could anyone give me a hand?

Thank you.

SHARELATEX_REDIS_HOST instead of SHARELATEX_REDIS_URL

Running "check:redis" task
Checking can connect to redis
>> FAIL.
>> !!!!!!!!!!!!!! REDIS ERROR !!!!!!!!!!!!!!
>>
>> ShareLaTeX can not talk to the redis instance
>>
>> Check the redis instance is running and accessible on env var
>> SHARELATEX_REDIS_URL
>>
>> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Fatal error: Can not connect to redis
Loading "Gruntfile.coffee" tasks...ERROR
>> Error: ENOENT, no such file or directory 'check:mongo'

when checking the logs, sharelatex tells you that you should check the SHARELATEX_REDIS_URL env variable. But it is called SHARELATEX_REDIS_HOST!

Server doesn't answer

I pulled the docker images for ShareLaTeX, docker and redis. I ran docker and redis like this:

sudo docker run --name sl-mongo -d mongo --net=host
sudo docker run --name sl-redis -d redis --net=host

And then when I ran ShareLaTeX docker image as given on the wiki:

docker run -d \
  -v ~/sharelatex_data:/var/lib/sharelatex \
  -p 5000:80 \
  --name=sharelatex \
  sharelatex/sharelatex

It seems to run without any issues, but then when I try to connect with http://host:5000 through my browser (where host is some ip-address, in my case http://192.81.221.40:5000/ it simply gives a time-out error.

It's probably me doing something wrong, but I can't figure out exactly what I'm doing wrong.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.