overleaf/server-ce/Dockerfile
2017-02-22 09:48:34 +00:00

50 lines
1.3 KiB
Docker

# Sharelatex Community Edition (sharelatex/sharelatex)
FROM sharelatex/sharelatex-base
ENV baseDir .
# Install sharelatex settings file
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
ADD ${baseDir}/logrotate/sharelatex /etc/logrotate.d/sharelatex
COPY ${baseDir}/init_scripts/ /etc/my_init.d/
# Install ShareLaTeX
RUN git clone https://github.com/sharelatex/sharelatex.git /var/www/sharelatex
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
RUN cd /var/www && npm install
RUN cd /var/www/sharelatex; \
npm install; \
grunt install; \
cd web/modules; \
git clone https://bitbucket.org/sharelatex/launchpad-webmodule.git launchpad; \
grunt compile;
RUN cd /var/www && node git-revision > revisions.txt
# Minify js assets
RUN cd /var/www/sharelatex/web; \
grunt compile:minify;
RUN cd /var/www/sharelatex/clsi; \
grunt compile:bin
EXPOSE 80
WORKDIR /
ENTRYPOINT ["/sbin/my_init"]