anchor.diff:  FROM phusion/baseimage:0.9.16
  +
  +ENV baseDir .
   
   # Install Node.js and Grunt
   RUN curl -sL https://deb.nodesource.com/setup | sudo bash -
  
positive.code: run apt-get update
  RUN apt-get install -y nginx;
  RUN rm /etc/nginx/sites-enabled/default
  ADD nginx/nginx.conf /etc/nginx/nginx.conf
  ADD nginx/sharelatex.conf /etc/nginx/sites-enabled/sharelatex.conf
  
  RUN mkdir /etc/service/nginx
  ADD runit/nginx.sh /etc/service/nginx/run
  
  # Set up ShareLaTeX services to run automatically on boot
  RUN mkdir /etc/service/chat-sharelatex; \
  
negative.code: RUN apt-get install -y imagemagick optipng
  
  # phusion/baseimage init script
  ADD ${baseDir}/00_regen_sharelatex_secrets.sh  /etc/my_init.d/00_regen_sharelatex_secrets.sh
  ADD ${baseDir}/00_make_sharelatex_data_dirs.sh /etc/my_init.d/00_make_sharelatex_data_dirs.sh
  ADD ${baseDir}/00_set_docker_host_ipaddress.sh /etc/my_init.d/00_set_docker_host_ipaddress.sh
  ADD ${baseDir}/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
  
  EXPOSE 80
  