2017-02-22 09:20:07 +00:00
|
|
|
# Sharelatex Community Edition (sharelatex/sharelatex)
|
|
|
|
|
2017-02-27 15:46:28 +00:00
|
|
|
FROM sharelatex/sharelatex-base:v1.0.0
|
2015-02-06 17:01:50 +00:00
|
|
|
|
2017-02-22 09:48:34 +00:00
|
|
|
ENV baseDir .
|
|
|
|
|
2017-02-21 11:22:25 +00:00
|
|
|
# Install sharelatex settings file
|
2016-09-21 12:47:07 +00:00
|
|
|
ADD ${baseDir}/settings.coffee /etc/sharelatex/settings.coffee
|
|
|
|
ENV SHARELATEX_CONFIG /etc/sharelatex/settings.coffee
|
|
|
|
|
2016-08-05 10:59:39 +00:00
|
|
|
ADD ${baseDir}/runit /etc/service
|
|
|
|
|
|
|
|
RUN rm /etc/nginx/sites-enabled/default
|
|
|
|
ADD ${baseDir}/nginx/nginx.conf /etc/nginx/nginx.conf
|
|
|
|
ADD ${baseDir}/nginx/sharelatex.conf /etc/nginx/sites-enabled/sharelatex.conf
|
|
|
|
|
2017-02-21 11:22:25 +00:00
|
|
|
ADD ${baseDir}/logrotate/sharelatex /etc/logrotate.d/sharelatex
|
2016-08-05 10:59:39 +00:00
|
|
|
|
2017-02-21 11:22:25 +00:00
|
|
|
COPY ${baseDir}/init_scripts/ /etc/my_init.d/
|
2016-08-05 10:59:39 +00:00
|
|
|
|
2015-02-10 16:49:34 +00:00
|
|
|
# Install ShareLaTeX
|
2017-02-22 09:48:34 +00:00
|
|
|
RUN git clone https://github.com/sharelatex/sharelatex.git /var/www/sharelatex
|
2015-02-06 17:01:50 +00:00
|
|
|
|
2016-05-02 23:55:53 +00:00
|
|
|
ADD ${baseDir}/services.js /var/www/sharelatex/config/services.js
|
|
|
|
ADD ${baseDir}/package.json /var/www/package.json
|
|
|
|
ADD ${baseDir}/git-revision.js /var/www/git-revision.js
|
2016-04-21 00:55:47 +00:00
|
|
|
RUN cd /var/www && npm install
|
|
|
|
|
2015-02-06 17:01:50 +00:00
|
|
|
RUN cd /var/www/sharelatex; \
|
|
|
|
npm install; \
|
2017-02-02 14:09:55 +00:00
|
|
|
grunt install; \
|
2017-09-06 10:16:12 +00:00
|
|
|
bash -c 'source ./bin/install-services'; \
|
2017-05-18 12:08:55 +00:00
|
|
|
cd web; \
|
2017-05-19 07:32:34 +00:00
|
|
|
npm install; \
|
|
|
|
npm install bcrypt; \
|
2017-05-18 12:08:55 +00:00
|
|
|
cd modules; \
|
2017-02-02 14:09:55 +00:00
|
|
|
git clone https://bitbucket.org/sharelatex/launchpad-webmodule.git launchpad; \
|
|
|
|
grunt compile;
|
2016-04-21 00:55:47 +00:00
|
|
|
|
|
|
|
RUN cd /var/www && node git-revision > revisions.txt
|
2015-02-06 17:01:50 +00:00
|
|
|
|
|
|
|
# Minify js assets
|
|
|
|
RUN cd /var/www/sharelatex/web; \
|
|
|
|
grunt compile:minify;
|
2015-02-10 16:49:34 +00:00
|
|
|
|
2016-05-26 10:01:21 +00:00
|
|
|
RUN cd /var/www/sharelatex/clsi; \
|
|
|
|
grunt compile:bin
|
|
|
|
|
2015-02-09 16:18:58 +00:00
|
|
|
EXPOSE 80
|
|
|
|
|
2016-05-31 14:16:31 +00:00
|
|
|
WORKDIR /
|
|
|
|
|
2015-02-18 17:08:41 +00:00
|
|
|
ENTRYPOINT ["/sbin/my_init"]
|
2016-05-31 14:15:24 +00:00
|
|
|
|