diff --git a/server-ce/Dockerfile b/server-ce/Dockerfile index 41aaa7e20c..240404ca65 100644 --- a/server-ce/Dockerfile +++ b/server-ce/Dockerfile @@ -21,18 +21,14 @@ RUN wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz; \ RUN echo "selected_scheme scheme-basic" >> /install-tl-unx/texlive.profile; \ /install-tl-unx/install-tl -profile /install-tl-unx/texlive.profile - RUN rm -r /install-tl-unx; \ rm install-tl-unx.tar.gz ENV PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/texlive/2016/bin/x86_64-linux/ RUN tlmgr install latexmk - -# Install Node.js and Grunt RUN npm install -g grunt-cli - # Set up sharelatex user and home directory RUN adduser --system --group --home /var/www/sharelatex --no-create-home sharelatex; \ mkdir -p /var/lib/sharelatex; \ @@ -43,6 +39,15 @@ RUN adduser --system --group --home /var/www/sharelatex --no-create-home sharela chown www-data:www-data /var/lib/sharelatex/data/template_files; +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 + +COPY {baseDir}/init_scripts /etc/my_init.d/ + + # Install ShareLaTeX RUN git clone https://github.com/sharelatex/sharelatex.git /var/www/sharelatex #random_change @@ -64,45 +69,7 @@ RUN cd /var/www/sharelatex/web; \ RUN cd /var/www/sharelatex/clsi; \ grunt compile:bin -RUN mkdir /etc/service/nginx -ADD ${baseDir}/runit/nginx.sh /etc/service/nginx/run - -# Set up ShareLaTeX services to run automatically on boot -RUN mkdir /etc/service/chat-sharelatex; \ - mkdir /etc/service/clsi-sharelatex; \ - mkdir /etc/service/docstore-sharelatex; \ - mkdir /etc/service/document-updater-sharelatex; \ - mkdir /etc/service/filestore-sharelatex; \ - mkdir /etc/service/real-time-sharelatex; \ - mkdir /etc/service/spelling-sharelatex; \ - mkdir /etc/service/tags-sharelatex; \ - mkdir /etc/service/track-changes-sharelatex; \ - mkdir /etc/service/web-sharelatex; - - -ADD ${baseDir}/runit/chat-sharelatex.sh /etc/service/chat-sharelatex/run -ADD ${baseDir}/runit/clsi-sharelatex.sh /etc/service/clsi-sharelatex/run -ADD ${baseDir}/runit/docstore-sharelatex.sh /etc/service/docstore-sharelatex/run -ADD ${baseDir}/runit/document-updater-sharelatex.sh /etc/service/document-updater-sharelatex/run -ADD ${baseDir}/runit/filestore-sharelatex.sh /etc/service/filestore-sharelatex/run -ADD ${baseDir}/runit/real-time-sharelatex.sh /etc/service/real-time-sharelatex/run -ADD ${baseDir}/runit/spelling-sharelatex.sh /etc/service/spelling-sharelatex/run -ADD ${baseDir}/runit/tags-sharelatex.sh /etc/service/tags-sharelatex/run -ADD ${baseDir}/runit/track-changes-sharelatex.sh /etc/service/track-changes-sharelatex/run -ADD ${baseDir}/runit/web-sharelatex.sh /etc/service/web-sharelatex/run - -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 - -# phusion/baseimage init script -ADD ${baseDir}/init_scripts/00_regen_sharelatex_secrets.sh /etc/my_init.d/00_regen_sharelatex_secrets.sh -ADD ${baseDir}/init_scripts/00_make_sharelatex_data_dirs.sh /etc/my_init.d/00_make_sharelatex_data_dirs.sh -ADD ${baseDir}/init_scripts/00_set_docker_host_ipaddress.sh /etc/my_init.d/00_set_docker_host_ipaddress.sh -ADD ${baseDir}/init_scripts/99_migrate.sh /etc/my_init.d/99_migrate.sh - # Install ShareLaTeX settings file -RUN mkdir /etc/sharelatex ADD ${baseDir}/settings.coffee /etc/sharelatex/settings.coffee ENV SHARELATEX_CONFIG /etc/sharelatex/settings.coffee diff --git a/server-ce/runit/chat-sharelatex.sh b/server-ce/runit/chat-sharelatex/run.sh similarity index 100% rename from server-ce/runit/chat-sharelatex.sh rename to server-ce/runit/chat-sharelatex/run.sh diff --git a/server-ce/runit/clsi-sharelatex.sh b/server-ce/runit/clsi-sharelatex/run.sh similarity index 100% rename from server-ce/runit/clsi-sharelatex.sh rename to server-ce/runit/clsi-sharelatex/run.sh diff --git a/server-ce/runit/docstore-sharelatex.sh b/server-ce/runit/docstore-sharelatex/run.sh similarity index 100% rename from server-ce/runit/docstore-sharelatex.sh rename to server-ce/runit/docstore-sharelatex/run.sh diff --git a/server-ce/runit/document-updater-sharelatex.sh b/server-ce/runit/document-updater-sharelatex/run.sh similarity index 100% rename from server-ce/runit/document-updater-sharelatex.sh rename to server-ce/runit/document-updater-sharelatex/run.sh diff --git a/server-ce/runit/filestore-sharelatex.sh b/server-ce/runit/filestore-sharelatex/run.sh similarity index 100% rename from server-ce/runit/filestore-sharelatex.sh rename to server-ce/runit/filestore-sharelatex/run.sh diff --git a/server-ce/runit/nginx.sh b/server-ce/runit/nginx/run.sh similarity index 100% rename from server-ce/runit/nginx.sh rename to server-ce/runit/nginx/run.sh diff --git a/server-ce/runit/real-time-sharelatex.sh b/server-ce/runit/real-time-sharelatex/run.sh similarity index 100% rename from server-ce/runit/real-time-sharelatex.sh rename to server-ce/runit/real-time-sharelatex/run.sh diff --git a/server-ce/runit/spelling-sharelatex.sh b/server-ce/runit/spelling-sharelatex/run.sh similarity index 100% rename from server-ce/runit/spelling-sharelatex.sh rename to server-ce/runit/spelling-sharelatex/run.sh diff --git a/server-ce/runit/tags-sharelatex.sh b/server-ce/runit/tags-sharelatex/run.sh similarity index 100% rename from server-ce/runit/tags-sharelatex.sh rename to server-ce/runit/tags-sharelatex/run.sh diff --git a/server-ce/runit/track-changes-sharelatex.sh b/server-ce/runit/track-changes-sharelatex/run.sh similarity index 100% rename from server-ce/runit/track-changes-sharelatex.sh rename to server-ce/runit/track-changes-sharelatex/run.sh diff --git a/server-ce/runit/web-sharelatex.sh b/server-ce/runit/web-sharelatex/run.sh similarity index 100% rename from server-ce/runit/web-sharelatex.sh rename to server-ce/runit/web-sharelatex/run.sh