[etherpad-web] Import code from https://github.com/wkulhanek/docker-openshift-etherpad, we'll rebase our changes on



commit 34194a03504fbe430c51b298bb558446f820065e
Author: Andrea Veri <averi redhat com>
Date:   Mon Dec 3 18:46:14 2018 +0100

    Import code from https://github.com/wkulhanek/docker-openshift-etherpad, we'll rebase our changes on top 
of it

 Dockerfile                               |  60 +++++
 README.adoc                              |  15 ++
 README.md                                |   2 -
 build.sh                                 |   8 +
 deploy.sh                                |   5 +
 etherpad-template.yaml                   | 364 +++++++++++++++++++++++++++++++
 etherpad-web.doap                        |  22 ++
 root/opt/etherpad/bin/fix-permissions.sh |   7 +
 root/opt/etherpad/docker-entrypoint.sh   |  37 ++++
 root/opt/etherpad/settings/settings.json | 208 ++++++++++++++++++
 10 files changed, 726 insertions(+), 2 deletions(-)
---
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..5573476
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,60 @@
+FROM centos:7
+MAINTAINER Wolfgang Kulhanek <WolfgangKulhanek gmail com>
+ARG ETHERPAD_VERSION="1.7.0"
+
+LABEL name="Etherpad Lite" \
+      io.k8s.display-name="Etherpad Lite" \
+      io.k8s.description="Provide an Etherpad on top of Red Hat OpenShift." \
+      io.openshift.expose-services="9001" \
+      io.openshift.tags="etherpad" \
+      build-date="2018-12-02" \
+      version=$ETHERPAD_VERSION \
+      release="1"
+
+RUN yum -y update && \
+    yum -y install epel-release && \
+    yum -y install openssl && \
+    yum clean all && \
+    rm -rf /var/cache/yum && \
+    mkdir -p /opt/etherpad
+
+RUN curl --silent --location https://rpm.nodesource.com/setup_8.x|bash -
+RUN yum -y install nodejs
+
+COPY ./root /
+
+# A few workarounds to run as non-root on OpenShift
+RUN curl -L -o /tmp/etherpad.tar  https://github.com/ether/etherpad-lite/tarball/$ETHERPAD_VERSION && \
+    tar -xzf /tmp/etherpad.tar --strip-components=1 -C /opt/etherpad && \
+    rm /tmp/etherpad.tar && \
+    mkdir /opt/etherpad/.npm && \
+    mkdir /.npm && \
+    mkdir /.config && \
+    chmod 777 /.npm
+
+WORKDIR /opt/etherpad
+
+# Install a few default plugins:
+RUN npm install ep_adminpads \
+    ep_font_family \
+    ep_font_size \
+    ep_headings2 \
+    ep_headings \
+    ep_font_color \
+    ep_markdown \
+    ep_small_list \
+    ep_copy_paste_select_all \
+    ep_copy_paste_images \
+    ep_aa_file_menu_toolbar
+
+RUN /opt/etherpad/bin/fix-permissions.sh /opt/etherpad && \
+    /opt/etherpad/bin/fix-permissions.sh /.npm && \
+    /opt/etherpad/bin/fix-permissions.sh /.config
+
+# Run as a random user. This happens on openshift by default so we
+# might as well always run as a random user
+USER 1001
+
+# Listens on 9001 by default
+EXPOSE 9001
+ENTRYPOINT ["/opt/etherpad/docker-entrypoint.sh"]
diff --git a/README.adoc b/README.adoc
new file mode 100644
index 0000000..711c1ac
--- /dev/null
+++ b/README.adoc
@@ -0,0 +1,15 @@
+== Etherpad Container for Red Hat OpenShift
+
+This repository provides an Etherpad Container to be run on Red Hat OpenShift. While you can build it 
yourself the easiest way to set up is to just deploy the image:
+
+[source,bash]
+----
+oc new-project etherpad --display-name "Shared Etherpad"
+
+oc new-app mysql-persistent --param MYSQL_USER=ether --param MYSQL_PASSWORD=ether --param 
MYSQL_DATABASE=ether --param VOLUME_CAPACITY=4Gi --param MYSQL_VERSION=5.7
+
+sleep 15
+
+# oc new-app -f etherpad-template.yaml -p DB_USER=ether -p DB_PASS=ether -p DB_DBID=ether -p DB_PORT=3306 -p 
DB_HOST=mysql -p ADMIN_PASSWORD=secret
+oc new-app -f 
https://raw.githubusercontent.com/wkulhanek/docker-openshift-etherpad/master/etherpad-template.yaml -p 
DB_USER=ether -p DB_PASS=ether -p DB_DBID=ether -p DB_PORT=3306 -p DB_HOST=mysql -p ADMIN_PASSWORD=secret
+----
diff --git a/build.sh b/build.sh
new file mode 100755
index 0000000..41287f7
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+export VERSION=1.7.0
+docker build . -t quay.io/wkulhanek/etherpad:${VERSION}
+docker tag quay.io/wkulhanek/etherpad:${VERSION} quay.io/wkulhanek/etherpad:latest
+docker push quay.io/wkulhanek/etherpad:${VERSION}
+docker push quay.io/wkulhanek/etherpad:latest
+git tag ${VERSION}
+git push origin ${VERSION}
diff --git a/deploy.sh b/deploy.sh
new file mode 100755
index 0000000..c727fdd
--- /dev/null
+++ b/deploy.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+oc new-project etherpad --display-name "Shared Etherpad"
+oc new-app mysql-persistent --param MYSQL_USER=ether --param MYSQL_PASSWORD=ether --param 
MYSQL_DATABASE=ether --param VOLUME_CAPACITY=4Gi --param MYSQL_VERSION=5.7
+sleep 15
+oc new-app -f etherpad-template.yaml -p DB_USER=ether -p DB_PASS=ether -p DB_DBID=ether -p DB_PORT=3306 -p 
DB_HOST=mysql -p ADMIN_PASSWORD=secret
diff --git a/etherpad-template.yaml b/etherpad-template.yaml
new file mode 100644
index 0000000..c7a62f5
--- /dev/null
+++ b/etherpad-template.yaml
@@ -0,0 +1,364 @@
+apiVersion: v1
+kind: Template
+metadata:
+  name: etherpad
+  annotations:
+    "openshift.io/display-name": Etherpad
+    description: |
+      A shared Notepad for an OpenShift Cluster.
+parameters:
+- name: NAME
+  description: Name of the DC, service, route
+  required: true
+  value: etherpad
+- name: ADMIN_PASSWORD
+  description: Admin password for etherpad/admin
+  required: true
+- name: DB_DBID
+  description: Database Name
+  value: ether
+  required: true
+- name: DB_HOST
+  description: Database host
+  value: mysql
+  required: true
+- name: DB_USER
+  description: Database User ID
+  value: ether
+  required: true
+- name: DB_PASS
+  description: Database Password
+  value: ether
+  required: true
+- name: DB_PORT
+  description: Database Port
+  value: "3306"
+  required: true
+- name: ETHERPAD_IMAGE
+  description: Etherpad Image to be used
+  value: "quay.io/wkulhanek/etherpad:latest"
+  required: true
+objects:
+
+- apiVersion: v1
+  kind: DeploymentConfig
+  metadata:
+    labels:
+      app: ${NAME}
+    name: ${NAME}
+  spec:
+    replicas: 1
+    selector:
+      app: ${NAME}
+      deploymentconfig: ${NAME}
+    strategy:
+      activeDeadlineSeconds: 21600
+      resources: {}
+      rollingParams:
+        intervalSeconds: 1
+        maxSurge: 25%
+        maxUnavailable: 25%
+        timeoutSeconds: 600
+        updatePeriodSeconds: 1
+      type: Rolling
+    template:
+      metadata:
+        labels:
+          app: ${NAME}
+          deploymentconfig: ${NAME}
+      spec:
+        containers:
+        - env:
+          - name: DB_DBID
+            value: ${DB_DBID}
+          - name: DB_HOST
+            value: ${DB_HOST}
+          - name: DB_PASS
+            value: ${DB_PASS}
+          - name: DB_PORT
+            value: ${DB_PORT}
+          - name: DB_USER
+            value: ${DB_USER}
+          - name: NODE_ENV
+            value: production
+          image: ${ETHERPAD_IMAGE}
+          imagePullPolicy: Always
+          name: ${NAME}
+          ports:
+          - containerPort: 9001
+            protocol: TCP
+          resources: {}
+          terminationMessagePath: /dev/termination-log
+          terminationMessagePolicy: File
+          readinessProbe:
+            failureThreshold: 5
+            httpGet:
+              path: /
+              port: 9001
+              scheme: HTTP
+            initialDelaySeconds: 60
+            periodSeconds: 10
+            successThreshold: 1
+            timeoutSeconds: 1
+          livenessProbe:
+            failureThreshold: 3
+            httpGet:
+              path: /
+              port: 9001
+              scheme: HTTP
+            initialDelaySeconds: 120
+            periodSeconds: 10
+            successThreshold: 1
+            timeoutSeconds: 1
+          volumeMounts:
+          - mountPath: /opt/etherpad/config
+            name: ${NAME}-settings
+        dnsPolicy: ClusterFirst
+        restartPolicy: Always
+        schedulerName: default-scheduler
+        securityContext: {}
+        terminationGracePeriodSeconds: 30
+        volumes:
+        - configMap:
+            defaultMode: 420
+            name: ${NAME}-settings
+          name: ${NAME}-settings
+
+- apiVersion: v1
+  kind: Service
+  metadata:
+    labels:
+      app: ${NAME}
+    name: ${NAME}
+  spec:
+    ports:
+    - name: ${NAME}
+      port: 9001
+      protocol: TCP
+      targetPort: 9001
+    selector:
+      app: ${NAME}
+      deploymentconfig: ${NAME}
+
+- apiVersion: v1
+  kind: Route
+  metadata:
+    labels:
+      app: ${NAME}
+    name: ${NAME}
+  spec:
+    to:
+      name: ${NAME}
+
+- apiVersion: v1
+  kind: ConfigMap
+  metadata:
+    creationTimestamp: null
+    name: ${NAME}-settings
+    labels:
+      app: ${NAME}
+  data:
+    settings.json: |
+      /*
+        This file must be valid JSON. But comments are allowed
+
+        Please edit settings.json, not settings.json.template
+      */
+      {
+        // Name your instance!
+        "title": "OpenTLC Etherpad",
+
+        // favicon default name
+        // alternatively, set up a fully specified Url to your own favicon
+        "favicon": "favicon.ico",
+
+        //IP and port which etherpad should bind at
+        "ip": "0.0.0.0",
+        "port" : 9001,
+
+        /*
+        // Node native SSL support
+        // this is disabled by default
+        //
+        // make sure to have the minimum and correct file access permissions set
+        // so that the Etherpad server can access them
+
+        "ssl" : {
+                  "key"  : "/path-to-your/epl-server.key",
+                  "cert" : "/path-to-your/epl-server.crt",
+                  "ca": ["/path-to-your/epl-intermediate-cert1.crt", 
"/path-to-your/epl-intermediate-cert2.crt"]
+                },
+
+        */
+
+        /*
+        //The Type of the database. You can choose between dirty, postgres, sqlite and mysql
+        //You shouldn't use "dirty" for for anything else than testing or development
+        "dbType" : "dirty",
+        //the database specific settings
+        "dbSettings" : {
+                         "filename" : "var/dirty.db"
+                       },
+        /*
+
+        /* An Example of MySQL Configuration
+         "dbType" : "mysql",
+         "dbSettings" : {
+                          "user"    : "root",
+                          "host"    : "localhost",
+                          "password": "",
+                          "database": "store"
+                        },
+        */
+
+         "dbType" : "mysql",
+         "dbSettings" : {
+                          "user"    : "DB_USER",
+                          "host"    : "DB_HOST",
+                          "port"    : "DB_PORT",
+                          "password": "DB_PASS",
+                          "database": "DB_DBID"
+                        },
+
+        //the default text of a pad
+        "defaultPadText" : "Welcome to Etherpad!\n\nThis pad text is synchronized as you type, so that 
everyone viewing this page sees the same text. This allows you to collaborate seamlessly on documents!\n\nGet 
involved with Etherpad at http:\/\/etherpad.org\n",
+
+        /* Default Pad behavior, users can override by changing */
+        "padOptions": {
+          "noColors": false,
+          "showControls": true,
+          "showChat": true,
+          "showLineNumbers": true,
+          "useMonospaceFont": false,
+          "userName": false,
+          "userColor": false,
+          "rtl": false,
+          "alwaysShowChat": false,
+          "chatAndUsers": false,
+          "lang": "en-gb"
+        },
+
+        /* Shoud we suppress errors from being visible in the default Pad Text? */
+        "suppressErrorsInPadText" : false,
+
+        /* Users must have a session to access pads. This effectively allows only group pads to be accessed. 
*/
+        "requireSession" : false,
+
+        /* Users may edit pads but not create new ones. Pad creation is only via the API. This applies both 
to group pads and regular pads. */
+        "editOnly" : false,
+
+        /* Users, who have a valid session, automatically get granted access to password protected pads */
+        "sessionNoPassword" : false,
+
+        /* if true, all css & js will be minified before sending to the client. This will improve the 
loading performance massivly,
+           but makes it impossible to debug the javascript/css */
+        "minify" : true,
+
+        /* How long may clients use served javascript code (in seconds)? Without versioning this
+           may cause problems during deployment. Set to 0 to disable caching */
+        "maxAge" : 21600, // 60 * 60 * 6 = 6 hours
+
+        /* This is the path to the Abiword executable. Setting it to null, disables abiword.
+           Abiword is needed to advanced import/export features of pads*/
+        "abiword" : null,
+
+        /* This is the path to the Tidy executable. Setting it to null, disables Tidy.
+           Tidy is used to improve the quality of exported pads*/
+        "tidyHtml" : null,
+
+        /* Allow import of file types other than the supported types: txt, doc, docx, rtf, odt, html & htm */
+        "allowUnknownFileEnds" : true,
+
+        /* This setting is used if you require authentication of all users.
+           Note: /admin always requires authentication. */
+        "requireAuthentication" : false,
+
+        /* Require authorization by a module, or a user with is_admin set, see below. */
+        "requireAuthorization" : false,
+
+        /*when you use NginX or another proxy/ load-balancer set this to true*/
+        "trustProxy" : false,
+
+        /* Privacy: disable IP logging */
+        "disableIPlogging" : false,
+
+        /* Users for basic authentication. is_admin = true gives access to /admin.
+           If you do not uncomment this, /admin will not be available! */
+
+        "users": {
+          "admin": {
+            "password": "${ADMIN_PASSWORD}",
+            "is_admin": true
+          }
+        },
+
+        // restrict socket.io transport methods
+        "socketTransportProtocols" : ["xhr-polling", "jsonp-polling", "htmlfile"],
+
+        // Allow Load Testing tools to hit the Etherpad Instance.  Warning this will disable security on the 
instance.
+        "loadTest": false,
+
+        /* The toolbar buttons configuration.
+        "toolbar": {
+          "left": [
+            ["bold", "italic", "underline", "strikethrough"],
+            ["orderedlist", "unorderedlist", "indent", "outdent"],
+            ["undo", "redo"],
+            ["clearauthorship"]
+          ],
+          "right": [
+            ["importexport", "timeslider", "savedrevision"],
+            ["settings", "embed"],
+            ["showusers"]
+          ],
+          "timeslider": [
+            ["timeslider_export", "timeslider_returnToPad"]
+          ]
+        },
+        */
+
+        /* The log level we are using, can be: DEBUG, INFO, WARN, ERROR */
+        "loglevel": "INFO",
+
+        //Logging configuration. See log4js documentation for further information
+        // https://github.com/nomiddlename/log4js-node
+        // You can add as many appenders as you want here:
+        "logconfig" :
+          { "appenders": [
+              { "type": "console"
+              //, "category": "access"// only logs pad access
+              }
+          /*
+            , { "type": "file"
+            , "filename": "your-log-file-here.log"
+            , "maxLogSize": 1024
+            , "backups": 3 // how many log files there're gonna be at max
+            //, "category": "test" // only log a specific category
+              }*/
+          /*
+            , { "type": "logLevelFilter"
+              , "level": "warn" // filters out all log messages that have a lower level than "error"
+              , "appender":
+                {  Use whatever appender you want here  }
+              }*/
+          /*
+            , { "type": "logLevelFilter"
+              , "level": "error" // filters out all log messages that have a lower level than "error"
+              , "appender":
+                { "type": "smtp"
+                , "subject": "An error occured in your EPL instance!"
+                , "recipients": "bar blurdybloop com, baz blurdybloop com"
+                , "sendInterval": 60*5 // in secs -- will buffer log messages; set to 0 to send a mail for 
every message
+                , "transport": "SMTP", "SMTP": { // see 
https://github.com/andris9/Nodemailer#possible-transport-methods
+                    "host": "smtp.example.com", "port": 465,
+                    "secureConnection": true,
+                    "auth": {
+                        "user": "foo example com",
+                        "pass": "bar_foo"
+                    }
+                  }
+                }
+              }*/
+            ]
+          }
+      }
diff --git a/etherpad-web.doap b/etherpad-web.doap
new file mode 100644
index 0000000..d130a24
--- /dev/null
+++ b/etherpad-web.doap
@@ -0,0 +1,22 @@
+<Project xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
+         xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#";
+         xmlns:foaf="http://xmlns.com/foaf/0.1/";
+         xmlns:gnome="http://api.gnome.org/doap-extensions#";
+         xmlns="http://usefulinc.com/ns/doap#";>
+
+  <name xml:lang="en">etherpad-web</name>
+  <shortdesc xml:lang="en">GNOME's Etherpad</shortdesc>
+  <description>GNOME's Etherpad</description>
+  <homepage rdf:resource="https://etherpad.gnome.org"; />
+  <category rdf:resource="http://api.gnome.org/doap-extensions#infrastructure"; />
+  <programming-language>Yaml</programming-language>
+  <programming-language>Bash</programming-language>
+
+  <maintainer>
+    <foaf:Person>
+      <foaf:name>GNOME Sysadmins</foaf:name>
+      <foaf:mbox rdf:resource="mailto:gnome-sysadmin gnome org" />
+      <gnome:userid>root</gnome:userid>
+    </foaf:Person>
+  </maintainer>
+</Project>
diff --git a/root/opt/etherpad/bin/fix-permissions.sh b/root/opt/etherpad/bin/fix-permissions.sh
new file mode 100755
index 0000000..97cb5e1
--- /dev/null
+++ b/root/opt/etherpad/bin/fix-permissions.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+# Taken from https://raw.githubusercontent.com/openshift/sti-base/master/bin/fix-permissions
+# Fix permissions on the given directory to allow group read/write of
+# regular files and execute of directories.
+chgrp -R 0 $1
+chmod -R g+rw $1
+find $1 -type d -exec chmod g+x {} +
diff --git a/root/opt/etherpad/docker-entrypoint.sh b/root/opt/etherpad/docker-entrypoint.sh
new file mode 100755
index 0000000..5c7d025
--- /dev/null
+++ b/root/opt/etherpad/docker-entrypoint.sh
@@ -0,0 +1,37 @@
+#!/bin/bash
+set -eux
+
+# If the database is not "linked" then an external database is being
+# used and the user is expected to set the following variables on the
+# docker command line:
+#
+#   DB_HOST - The hostname to reach for the db
+#   DB_DBID - The database name
+#   DB_PASS - The database password
+#   DB_PORT - The port where the db is listening
+#   DB_USER - The database username
+
+# If the database is "linked" (docker run --link) to this container
+# from a db container then translate the vars into ones that we will use.
+# NOTE: assumes linked alias is 'db'
+if [ ! -z "${DB_NAME:-}" ]; then
+    DB_HOST="${DB_PORT_3306_TCP_ADDR}"
+    DB_DBID="${DB_ENV_MYSQL_DATABASE}"
+    DB_PASS="${DB_ENV_MYSQL_PASSWORD}"
+    DB_PORT="${DB_PORT_3306_TCP_PORT}"
+    DB_USER="${DB_ENV_MYSQL_USER}"
+fi
+
+# Update the settings.json with appropriate values
+# Having settings.json in its own config directory allows us to replace
+# it at runtime with a ConfigMap
+echo "Updating Settings File"
+cp config/settings.json .
+sed -i "s/DB_HOST/${DB_HOST}/" settings.json
+sed -i "s/DB_DBID/${DB_DBID}/" settings.json
+sed -i "s/DB_PASS/${DB_PASS}/" settings.json
+sed -i "s/DB_PORT/${DB_PORT}/" settings.json
+sed -i "s/DB_USER/${DB_USER}/" settings.json
+
+# Execute the etherpad provided startup script
+./bin/run.sh $@
diff --git a/root/opt/etherpad/settings/settings.json b/root/opt/etherpad/settings/settings.json
new file mode 100644
index 0000000..71e9eb3
--- /dev/null
+++ b/root/opt/etherpad/settings/settings.json
@@ -0,0 +1,208 @@
+/*
+  This file must be valid JSON. But comments are allowed
+
+  Please edit settings.json, not settings.json.template
+*/
+{
+  // Name your instance!
+  "title": "Etherpad",
+
+  // favicon default name
+  // alternatively, set up a fully specified Url to your own favicon
+  "favicon": "favicon.ico",
+
+  //IP and port which etherpad should bind at
+  "ip": "0.0.0.0",
+  "port" : 9001,
+
+  /*
+  // Node native SSL support
+  // this is disabled by default
+  //
+  // make sure to have the minimum and correct file access permissions set
+  // so that the Etherpad server can access them
+
+  "ssl" : {
+            "key"  : "/path-to-your/epl-server.key",
+            "cert" : "/path-to-your/epl-server.crt",
+            "ca": ["/path-to-your/epl-intermediate-cert1.crt", "/path-to-your/epl-intermediate-cert2.crt"]
+          },
+
+  */
+
+  /*
+  //The Type of the database. You can choose between dirty, postgres, sqlite and mysql
+  //You shouldn't use "dirty" for for anything else than testing or development
+  "dbType" : "dirty",
+  //the database specific settings
+  "dbSettings" : {
+                   "filename" : "var/dirty.db"
+                 },
+  /*
+
+  /* An Example of MySQL Configuration
+   "dbType" : "mysql",
+   "dbSettings" : {
+                    "user"    : "root",
+                    "host"    : "localhost",
+                    "password": "",
+                    "database": "store"
+                  },
+  */
+
+   "dbType" : "mysql",
+   "dbSettings" : {
+                    "user"    : "DB_USER",
+                    "host"    : "DB_HOST",
+                    "port"    : "DB_PORT",
+                    "password": "DB_PASS",
+                    "database": "DB_DBID"
+                  },
+
+  //the default text of a pad
+  "defaultPadText" : "Welcome to the OpenTLC Etherpad!\n\nThis pad text is synchronized as you type, so that 
everyone viewing this page sees the same text. This allows you to collaborate seamlessly on documents!\n",
+
+  /* Default Pad behavior, users can override by changing */
+  "padOptions": {
+    "noColors": false,
+    "showControls": true,
+    "showChat": true,
+    "showLineNumbers": true,
+    "useMonospaceFont": false,
+    "userName": false,
+    "userColor": false,
+    "rtl": false,
+    "alwaysShowChat": false,
+    "chatAndUsers": false,
+    "lang": "en-us"
+  },
+
+  /* Shoud we suppress errors from being visible in the default Pad Text? */
+  "suppressErrorsInPadText" : false,
+
+  /* Users must have a session to access pads. This effectively allows only group pads to be accessed. */
+  "requireSession" : false,
+
+  /* Users may edit pads but not create new ones. Pad creation is only via the API. This applies both to 
group pads and regular pads. */
+  "editOnly" : false,
+
+  /* Users, who have a valid session, automatically get granted access to password protected pads */
+  "sessionNoPassword" : false,
+
+  /* if true, all css & js will be minified before sending to the client. This will improve the loading 
performance massivly,
+     but makes it impossible to debug the javascript/css */
+  "minify" : true,
+
+  /* How long may clients use served javascript code (in seconds)? Without versioning this
+     may cause problems during deployment. Set to 0 to disable caching */
+  "maxAge" : 21600, // 60 * 60 * 6 = 6 hours
+
+  /* This is the path to the Abiword executable. Setting it to null, disables abiword.
+     Abiword is needed to advanced import/export features of pads*/
+  "abiword" : null,
+
+  /* This is the path to the Tidy executable. Setting it to null, disables Tidy.
+     Tidy is used to improve the quality of exported pads*/
+  "tidyHtml" : null,
+
+  /* Allow import of file types other than the supported types: txt, doc, docx, rtf, odt, html & htm */
+  "allowUnknownFileEnds" : false,
+
+  /* This setting is used if you require authentication of all users.
+     Note: /admin always requires authentication. */
+  "requireAuthentication" : false,
+
+  /* Require authorization by a module, or a user with is_admin set, see below. */
+  "requireAuthorization" : false,
+
+  /*when you use NginX or another proxy/ load-balancer set this to true*/
+  "trustProxy" : false,
+
+  /* Privacy: disable IP logging */
+  "disableIPlogging" : false,
+
+  /* Users for basic authentication. is_admin = true gives access to /admin.
+     If you do not uncomment this, /admin will not be available! */
+  /*
+  "users": {
+    "admin": {
+      "password": "changeme1",
+      "is_admin": true
+    },
+    "user": {
+      "password": "changeme1",
+      "is_admin": false
+    }
+  },
+  */
+
+  // restrict socket.io transport methods
+  "socketTransportProtocols" : ["xhr-polling", "jsonp-polling", "htmlfile"],
+
+  // Allow Load Testing tools to hit the Etherpad Instance.  Warning this will disable security on the 
instance.
+  "loadTest": false,
+
+  /* The toolbar buttons configuration.
+  "toolbar": {
+    "left": [
+      ["bold", "italic", "underline", "strikethrough"],
+      ["orderedlist", "unorderedlist", "indent", "outdent"],
+      ["undo", "redo"],
+      ["clearauthorship"]
+    ],
+    "right": [
+      ["importexport", "timeslider", "savedrevision"],
+      ["settings", "embed"],
+      ["showusers"]
+    ],
+    "timeslider": [
+      ["timeslider_export", "timeslider_returnToPad"]
+    ]
+  },
+  */
+
+  /* The log level we are using, can be: DEBUG, INFO, WARN, ERROR */
+  "loglevel": "WARN",
+
+  //Logging configuration. See log4js documentation for further information
+  // https://github.com/nomiddlename/log4js-node
+  // You can add as many appenders as you want here:
+  "logconfig" :
+    { "appenders": [
+        { "type": "console"
+        //, "category": "access"// only logs pad access
+        }
+    /*
+      , { "type": "file"
+      , "filename": "your-log-file-here.log"
+      , "maxLogSize": 1024
+      , "backups": 3 // how many log files there're gonna be at max
+      //, "category": "test" // only log a specific category
+        }*/
+    /*
+      , { "type": "logLevelFilter"
+        , "level": "warn" // filters out all log messages that have a lower level than "error"
+        , "appender":
+          {  Use whatever appender you want here  }
+        }*/
+    /*
+      , { "type": "logLevelFilter"
+        , "level": "error" // filters out all log messages that have a lower level than "error"
+        , "appender":
+          { "type": "smtp"
+          , "subject": "An error occured in your EPL instance!"
+          , "recipients": "bar blurdybloop com, baz blurdybloop com"
+          , "sendInterval": 60*5 // in secs -- will buffer log messages; set to 0 to send a mail for every 
message
+          , "transport": "SMTP", "SMTP": { // see 
https://github.com/andris9/Nodemailer#possible-transport-methods
+              "host": "smtp.example.com", "port": 465,
+              "secureConnection": true,
+              "auth": {
+                  "user": "foo example com",
+                  "pass": "bar_foo"
+              }
+            }
+          }
+        }*/
+      ]
+    }
+}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]