Prechádzať zdrojové kódy

Update to use latest ShareLaTeX release

James Allen 11 rokov pred
rodič
commit
5e00d8d3b4
3 zmenil súbory, kde vykonal 28 pridanie a 12 odobranie
  1. 5 4
      server-ce/Dockerfile
  2. 16 0
      server-ce/README.md
  3. 7 8
      server-ce/settings.coffee

+ 5 - 4
server-ce/Dockerfile

@@ -59,10 +59,6 @@ ADD runit/tags-sharelatex.sh             /etc/service/tags-sharelatex/run
 ADD runit/track-changes-sharelatex.sh    /etc/service/track-changes-sharelatex/run
 ADD runit/track-changes-sharelatex.sh    /etc/service/track-changes-sharelatex/run
 ADD runit/web-sharelatex.sh              /etc/service/web-sharelatex/run
 ADD runit/web-sharelatex.sh              /etc/service/web-sharelatex/run
 
 
-# Install ShareLaTeX settings file
-RUN mkdir /etc/sharelatex
-ADD settings.coffee /etc/sharelatex/settings.coffee
-
 # Install TexLive
 # Install TexLive
 RUN apt-get install -y wget
 RUN apt-get install -y wget
 RUN wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz; \
 RUN wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz; \
@@ -88,6 +84,11 @@ ADD 00_regen_sharelatex_secrets.sh  /etc/my_init.d/00_regen_sharelatex_secrets.s
 ADD 00_make_sharelatex_data_dirs.sh /etc/my_init.d/00_make_sharelatex_data_dirs.sh
 ADD 00_make_sharelatex_data_dirs.sh /etc/my_init.d/00_make_sharelatex_data_dirs.sh
 ADD 00_set_docker_host_ipaddress.sh /etc/my_init.d/00_set_docker_host_ipaddress.sh
 ADD 00_set_docker_host_ipaddress.sh /etc/my_init.d/00_set_docker_host_ipaddress.sh
 
 
+# Install ShareLaTeX settings file
+RUN mkdir /etc/sharelatex
+ADD settings.coffee /etc/sharelatex/settings.coffee
+ENV SHARELATEX_CONFIG /etc/sharelatex/settings.coffee
+
 EXPOSE 80
 EXPOSE 80
 
 
 ENTRYPOINT ["/sbin/my_init"]
 ENTRYPOINT ["/sbin/my_init"]

+ 16 - 0
server-ce/README.md

@@ -158,6 +158,8 @@ The available configuration parameters are:
 * `SHARELATEX_SITE_URL`: Where your instance of ShareLaTeX is publically available.
 * `SHARELATEX_SITE_URL`: Where your instance of ShareLaTeX is publically available.
 This is used in public links, and when connecting over websockets, so much be
 This is used in public links, and when connecting over websockets, so much be
 configured correctly!
 configured correctly!
+* `SHARELATEX_ADMIN_EMAIL`: The email address where users can reach the person who runs the site.
+* `SHARELATEX_APP_NAME`: The name to display when talking about the running app. Defaults to 'ShareLaTex (Community Edition)'.
 * `SHARELATEX_MONGO_URL`: The URL of the Mongo database to use
 * `SHARELATEX_MONGO_URL`: The URL of the Mongo database to use
 * `SHARELATEX_REDIS_HOST`: The host name of the Redis instance to use
 * `SHARELATEX_REDIS_HOST`: The host name of the Redis instance to use
 * `SHARELATEX_REDIS_PORT`: The port of the Redis instance to use
 * `SHARELATEX_REDIS_PORT`: The port of the Redis instance to use
@@ -165,6 +167,20 @@ configured correctly!
 * `SHARELATEX_SECURE_COOKIE`: Set this to something non-zero to use a secure cookie.
 * `SHARELATEX_SECURE_COOKIE`: Set this to something non-zero to use a secure cookie.
   Only use this if your ShareLaTeX instance is running behind a reverse proxy with SSL configured.
   Only use this if your ShareLaTeX instance is running behind a reverse proxy with SSL configured.
 
 
+### Creating and Managing users
+
+Uun the following command to create your first user and make them an admin:
+
+```
+$ docker exec sharelatex /bin/bash -c "cd /var/www/sharelatex/web; grunt create-admin-user --email joe@example.com"
+```
+
+This will create a user with the given email address if they don't already exist, and make them an admin user. You will be given a URL to visit where you can set the password for this user and log in for the first time.
+
+**Creating normal users**
+
+Once you are logged in as an admin user, you can visit `/admin/register` on your ShareLaTeX instance and create a new users. If you have an email backend configured in your settings file, the new users will be sent an email with a URL to set their password. If not, you will have to distribute the password reset URLs manually. These are shown when you create a user.
+
 ### Upgrading from older versions
 ### Upgrading from older versions
 
 
 *Please make sure to back up all Mongo, Redis and on-disk data before upgrading.*
 *Please make sure to back up all Mongo, Redis and on-disk data before upgrading.*

+ 7 - 8
server-ce/settings.coffee

@@ -93,14 +93,13 @@ module.exports =
 	# Where your instance of ShareLaTeX can be found publicly. This is used
 	# Where your instance of ShareLaTeX can be found publicly. This is used
 	# when emails are sent out and in generated links:
 	# when emails are sent out and in generated links:
 	siteUrl: siteUrl = process.env["SHARELATEX_SITE_URL"] or 'http://localhost'
 	siteUrl: siteUrl = process.env["SHARELATEX_SITE_URL"] or 'http://localhost'
-	
-	# The websocket layer of ShareLaTeX runs as separate service.
-	# When running locally or in development, you can point the client to this
-	# service directly. If you are running behind a reverse proxy (Nginx, etc)
-	# then websocketsUrl should be the same as siteUrl, with your reverse
-	# proxy responible for sending websocket traffic to the websocket service
-	# rather than connecting directly.
-	websocketsUrl: siteUrl
+
+	# The name this is used to describe your ShareLaTeX Installation
+	appName: process.env["SHARELATEX_APP_NAME"] or "ShareLaTeX (Community Edition)"
+
+	# The email address which users will be directed to as the main point of
+	# contact for this installation of ShareLaTeX.
+	adminEmail: process.env["SHARELATEX_ADMIN_EMAIL"] or "placeholder@example.com"
 	
 	
 	# If provided, a sessionSecret is used to sign cookies so that they cannot be
 	# If provided, a sessionSecret is used to sign cookies so that they cannot be
 	# spoofed. This is recommended.
 	# spoofed. This is recommended.