overleaf/server-ce/Dockerfile

55 lines
1.4 KiB
Docker
Raw Normal View History

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
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
2017-02-21 06:22:25 -05:00
COPY ${baseDir}/init_scripts/ /etc/my_init.d/
# 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; \
2017-09-06 06:16:12 -04:00
bash -c 'source ./bin/install-services'; \
2017-05-18 08:08:55 -04:00
cd web; \
2017-05-19 03:32:34 -04:00
npm install; \
npm install bcrypt; \
2017-05-18 08:08:55 -04:00
cd modules; \
2017-02-02 09:09:55 -05:00
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;
RUN cd /var/www/sharelatex/clsi; \
grunt compile:bin
2015-02-09 11:18:58 -05:00
EXPOSE 80
WORKDIR /
2015-02-18 12:08:41 -05:00
ENTRYPOINT ["/sbin/my_init"]
2016-05-31 10:15:24 -04:00