overleaf/Dockerfile

56 lines
1.4 KiB
Text
Raw Normal View History

2017-02-22 09:20:07 +00:00
# Sharelatex Community Edition (sharelatex/sharelatex)
2017-09-08 08:09:42 +00:00
FROM sharelatex/sharelatex-base:latest
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
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
2017-02-21 11:22:25 +00:00
COPY ${baseDir}/init_scripts/ /etc/my_init.d/
# 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; \
2018-02-06 10:26:29 +00:00
git clone https://github.com/sharelatex/launchpad-web-module.git launchpad; \
2017-02-02 14:09:55 +00:00
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;
RUN cd /var/www/sharelatex/clsi; \
grunt compile:bin; \
chown -R www-data:www-data /var/www/sharelatex;
2015-02-09 16:18:58 +00:00
EXPOSE 80
WORKDIR /
2015-02-18 17:08:41 +00:00
ENTRYPOINT ["/sbin/my_init"]
2016-05-31 14:15:24 +00:00