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