Update to use release version of ShareLaTeX

This commit is contained in:
James Allen 2015-02-10 16:49:34 +00:00
parent d347ee087d
commit c8be8b526c
2 changed files with 28 additions and 22 deletions

View file

@ -1,8 +1,8 @@
FROM phusion/baseimage:0.9.16
# Install Node.js and Grunt
RUN curl -sL https://deb.nodesource.com/setup | sudo bash -
RUN apt-get install -y build-essential nodejs
RUN npm install -g grunt-cli
# Set up sharelatex user and home directory
@ -12,8 +12,9 @@ RUN adduser --system --group --home /var/www/sharelatex --no-create-home sharela
mkdir -p /var/log/sharelatex; \
chown sharelatex:sharelatex /var/log/sharelatex;
# Install ShareLaTeX
RUN apt-get install -y git python
RUN git clone https://github.com/sharelatex/sharelatex.git /var/www/sharelatex
RUN git clone -b release https://github.com/sharelatex/sharelatex.git /var/www/sharelatex
# zlib1g-dev is needed to compile the synctex binaries in the CLSI during `grunt install`.
RUN apt-get install -y zlib1g-dev
@ -25,7 +26,8 @@ RUN cd /var/www/sharelatex; \
# Minify js assets
RUN cd /var/www/sharelatex/web; \
grunt compile:minify;
# Install Nginx as a reverse proxy
RUN apt-get install -y nginx;
RUN rm /etc/nginx/sites-enabled/default
ADD nginx/nginx.conf /etc/nginx/nginx.conf
@ -33,7 +35,8 @@ ADD nginx/sharelatex.conf /etc/nginx/sites-enabled/sharelatex.conf
RUN mkdir /etc/service/nginx
ADD runit/nginx.sh /etc/service/nginx/run
# Set up ShareLaTeX services to run automatically on boot
RUN mkdir /etc/service/chat-sharelatex; \
mkdir /etc/service/clsi-sharelatex; \
mkdir /etc/service/docstore-sharelatex; \
@ -56,10 +59,11 @@ ADD runit/tags-sharelatex.sh /etc/service/tags-sharelatex/run
ADD runit/track-changes-sharelatex.sh /etc/service/track-changes-sharelatex/run
ADD runit/web-sharelatex.sh /etc/service/web-sharelatex/run
# Install ShareLaTeX settings file
RUN mkdir /etc/sharelatex
ADD settings.coffee /etc/sharelatex/settings.coffee
# TexLive
# Install TexLive
RUN apt-get install -y wget
RUN wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz; \
mkdir /install-tl-unx; \
@ -73,7 +77,7 @@ RUN rm -r /install-tl-unx; \
ENV PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/texlive/2014/bin/x86_64-linux/
RUN tlmgr install latexmk
# Aspell
# Install Aspell
RUN apt-get install -y aspell aspell-en aspell-af aspell-am aspell-ar aspell-ar-large aspell-bg aspell-bn aspell-br aspell-ca aspell-cs aspell-cy aspell-da aspell-de aspell-de-alt aspell-el aspell-eo aspell-es aspell-et aspell-eu-es aspell-fa aspell-fo aspell-fr aspell-ga aspell-gl-minimos aspell-gu aspell-he aspell-hi aspell-hr aspell-hsb aspell-hu aspell-hy aspell-id aspell-is aspell-it aspell-kk aspell-kn aspell-ku aspell-lt aspell-lv aspell-ml aspell-mr aspell-nl aspell-no aspell-nr aspell-ns aspell-or aspell-pa aspell-pl aspell-pt-br aspell-ro aspell-ru aspell-sk aspell-sl aspell-ss aspell-st aspell-sv aspell-ta aspell-te aspell-tl aspell-tn aspell-ts aspell-uk aspell-uz aspell-xh aspell-zu
# phusion/baseimage init script

View file

@ -4,13 +4,13 @@ ShareLaTeX Docker Image
**Please read this entire file before installing ShareLaTeX via Docker. It's only
short but contains some important information.**
The recommended way to install and run ShareLaTeX Community Edition is via Docker:
The recommended way to install and run ShareLaTeX Community Edition is via [Docker](https://www.docker.com/):
```
$ docker run -d -v sharelatex:/var/lib/sharelatex --name=sharelatex sharelatex/sharelatex
$ docker run -d -v ~/sharelatex_data:/var/lib/sharelatex -p 80 --name=sharelatex sharelatex/sharelatex
```
This will download the ShareLaTeX image and start it running in the background.
This will download the ShareLaTeX image and start it running in the background on port 80. You should be able to access it at http://localhost/.
To stop ShareLaTeX:
@ -32,8 +32,8 @@ docker rm sharelatex
### Storing Data
The `-v sharelatex:/var/lib/sharelatex` option in the `run` command tells
Docker to make the host directory `sharelatex` available inside the container for
The `-v ~/sharelatex_data:/var/lib/sharelatex` option in the `run` command tells
Docker to make the host directory `~/sharelatex_data` available inside the container for
ShareLaTeX to store data files in. This means that you can back up and access these
files manually outside of the ShareLaTeX container. If you would like to store ShareLaTeX data
in a different location, such as `/home/james/my_data`, just change this parameter:
@ -41,6 +41,7 @@ in a different location, such as `/home/james/my_data`, just change this paramet
```
$ docker run -d \
-v /home/james/my_data:/var/lib/sharelatex \
-p 80 \
--name=sharelatex \
sharelatex/sharelatex
```
@ -69,7 +70,8 @@ want to access services on the host machine then you should use `dockerhost`.* F
```
$ docker run -d \
-v sharelatex:/var/lib/sharelatex \
-v ~/sharelatex_data:/var/lib/sharelatex \
-p 80 \
--name=sharelatex \
--env SHARELATEX_MONGO_URL=mongodb://dockerhost/sharelatex \
sharelatex/sharelatex
@ -91,15 +93,15 @@ listen on port 5000:
```
$ docker run -d \
-v sharelatex:/var/lib/sharelatex \
--name=sharelatex \
-v ~/sharelatex_data:/var/lib/sharelatex \
-p 5000:80 \
--name=sharelatex \
--env SHARELATEX_SITE_URL=http://localhost:5000 \
sharelatex/sharelatex
```
(Note that you also have to update the `SHARELATEX_SITE_URL` parameter so that
it knows where it is publicly available.)
**(Note that you also have to update the `SHARELATEX_SITE_URL` parameter so that
ShareLaTeX knows where to refer to scripts and links that need loading.)**
### LaTeX environment
@ -119,11 +121,11 @@ You can pass configuration options to ShareLaTeX as environment variables:
```
$ docker run -d \
-v /sharelatex-data:/var/lib/sharelatex \
--net=host \
--name=sharelatex \
--env SHARELATEX_MONGO_URL=mongodb://my.mongo.host/sharelatex \
sharelatex/sharelatex
-v ~/sharelatex_data:/var/lib/sharelatex \
-p 80 \
--name=sharelatex \
--env SHARELATEX_MONGO_URL=mongodb://my.mongo.host/sharelatex \
sharelatex/sharelatex
```
The available configuration parameters are:
@ -152,5 +154,5 @@ $ docker rm sharelatex
Start a new container with the updated version of ShareLaTeX (to upgrade to version 1.4.0 for example):
```
$ docker run -d -v sharelatex:/var/lib/sharelatex --name=sharelatex sharelatex/sharelatex:1.4.0
$ docker run -d -v ~/sharelatex_data:/var/lib/sharelatex --name=sharelatex sharelatex/sharelatex:1.4.0
```