Commit 7d6759e1 authored by erdnaxe's avatar erdnaxe 🎇

Env file for Etherpad

parent 72a78c83
# Recettes Docker
Ensemble des recettes Docker d'erdnaxe.
Pour lancer un service, aller dans le dossier puis
`sudo docker-compose up --build -d`.
## Configuration
Des fichiers `example.env` doivent être copiés en `.env` puis configurés.
## Map des ports
* 8080 -> Riot Web (chat)
* 8081 -> CodiMD
* 8082 -> Grafana
* 8083 -> PrivateBin (paste)
* 8084 -> EtherPad (pad)
* 8085 -> Django CAS server (cas)
* 8086 -> ShareLatex
# Etherpad Lite Dockerfile
#
# https://github.com/ether/etherpad-docker
#
# Author: muxator
#
# Version 0.1, patched by erdnaxe
FROM node:latest
LABEL maintainer="Etherpad team, https://github.com/ether/etherpad-lite"
# git hash of the version to be built.
# If not given, build the latest development version.
ARG ETHERPAD_VERSION=develop
# plugins to install while building the container. By default no plugins are
# installed.
# If given a value, it has to be a space-separated, quoted list of plugin names.
#
# EXAMPLE:
# ETHERPAD_PLUGINS="ep_codepad ep_author_neat"
ARG ETHERPAD_PLUGINS=
# Set the following to production to avoid installing devDeps
# this can be done with build args (and is mandatory to build ARM version)
ARG NODE_ENV=development
# grab the ETHERPAD_VERSION tarball from github (no need to clone the whole
# repository)
RUN echo "Getting version: ${ETHERPAD_VERSION}" && \
curl \
--location \
--fail \
--silent \
--show-error \
--output /opt/etherpad-lite.tar.gz \
https://github.com/ether/etherpad-lite/archive/"${ETHERPAD_VERSION}".tar.gz && \
mkdir /opt/etherpad-lite && \
tar xf /opt/etherpad-lite.tar.gz \
--directory /opt/etherpad-lite \
--strip-components=1 && \
rm /opt/etherpad-lite.tar.gz
WORKDIR /opt/etherpad-lite
# install node dependencies for Etherpad
RUN bin/installDeps.sh
# Install the plugins, if ETHERPAD_PLUGINS is not empty.
#
# Bash trick: in the for loop ${ETHERPAD_PLUGINS} is NOT quoted, in order to be
# able to split at spaces.
RUN for PLUGIN_NAME in ${ETHERPAD_PLUGINS}; do npm install "${PLUGIN_NAME}"; done
# Copy the custom configuration file
COPY settings.json /opt/etherpad-lite/
EXPOSE 9001
CMD ["node", "node_modules/ep_etherpad-lite/node/server.js"]
version: "3.7"
version: "3"
services:
etherpad:
build:
context: .
args:
ETHERPAD_VERSION: 1.7.5
NODE_ENV: production
image: etherpad/etherpad
environment:
- NODE_ENV=production
- POSTGRES_USER=etherpad
- "POSTGRES_PASSWORD=${POSTGRES_PASSWD}"
- POSTGRES_DB=etherpad
ports:
- 8084:9001
volumes:
- ./settings.json:/opt/etherpad-lite/settings.json:ro
restart: always
database:
......@@ -16,9 +19,9 @@ services:
# You need to migrate the Database to the new PostgreSQL version
image: postgres:9.6-alpine
environment:
POSTGRES_USER: etherpad
POSTGRES_PASSWORD: etherpadpass
POSTGRES_DB: etherpad
- POSTGRES_USER=etherpad
- "POSTGRES_PASSWORD=${POSTGRES_PASSWD}"
- POSTGRES_DB=etherpad
volumes:
- ./data_db:/var/lib/postgresql/data
restart: always
POSTGRES_PASSWD=asupersecurepassword
......@@ -3,14 +3,54 @@
*
* Please edit settings.json, not settings.json.template
*
* Please note that since Etherpad 1.6.0 you can store DB credentials in a
* separate file (credentials.json).
* Please note that starting from Etherpad 1.6.0 you can store DB credentials in
* a separate file (credentials.json).
*
*
* ENVIRONMENT VARIABLE SUBSTITUTION
* =================================
*
* All the configuration values can be read from environment variables using the
* syntax "${ENV_VAR}" or "${ENV_VAR:default_value}".
*
* This is useful, for example, when running in a Docker container.
*
* EXAMPLE:
* "port": "${PORT:9001}"
* "minify": "${MINIFY}"
* "skinName": "${SKIN_NAME:colibris}"
*
* Would read the configuration values for those items from the environment
* variables PORT, MINIFY and SKIN_NAME.
* If PORT and SKIN_NAME variables were not defined, the default values 9001 and
* "colibris" would be used. The configuration value "minify", on the other
* hand, does not have a default indicated. Thus, if the environment variable
* MINIFY were undefined, "minify" would be null (do not do this).
*
* REMARKS:
* Please note that variable substitution always needs to be quoted.
*
* "port": 9001, <-- Literal values. When not using
* "minify": false substitution, only strings must be
* "skinName": "colibris" quoted. Booleans and numbers must not.
*
* "port": "${PORT:9001}" <-- CORRECT: if you want to use a variable
* "minify": "${MINIFY:true}" substitution, put quotes around its name,
* "skinName": "${SKIN_NAME}" even if the required value is a number or
* a boolean.
* Etherpad will take care of rewriting it
* to the proper type if necessary.
*
* "port": ${PORT:9001} <-- ERROR: this is not valid json. Quotes
* "minify": ${MINIFY} around variable names are missing.
* "skinName": ${SKIN_NAME}
*
*/
{
/*
* Name your instance!
*/
"title": "Etherpad Servens",
"title": "Etherpad",
/*
* favicon default name
......@@ -19,8 +59,17 @@
"favicon": "favicon.ico",
/*
* Skin name.
*
* Its value has to be an existing directory under src/static/skins.
* You can write your own, or use one of the included ones:
*
* - "no-skin": an empty skin (default). This yields the unmodified,
* traditional Etherpad theme.
* - "colibris": the new experimental skin (since Etherpad 1.8), candidate to
* become the default in Etherpad 2.0
*/
"skinName": "no-skin",
"skinName": "colibris",
/*
* IP and port which etherpad should bind at
......@@ -60,24 +109,22 @@
* You shouldn't use "dirty" for for anything else than testing or
* development.
*
* For a complete list of the supported drivers, please consult:
* https://www.npmjs.com/package/ueberdb2
*/
"dbType" : "postgres",
/*
* Database specific settings (dependent on dbType).
*
* Database specific settings are dependent on dbType, and go in dbSettings.
* Remember that since Etherpad 1.6.0 you can also store these informations in
* credentials.json.
*
* For a complete list of the supported drivers, please refer to:
* https://www.npmjs.com/package/ueberdb2
*/
"dbType" : "postgres",
"dbSettings" : {
"user" : "etherpad",
"user" : "${POSTGRES_USER}",
"host" : "database",
"port" : 5432,
"password": "etherpadpass",
"database": "etherpad"
"password": "${POSTGRES_PASSWORD}",
"database": "${POSTGRES_DB}"
},
/*
......@@ -87,7 +134,7 @@
*/
/*
"dbType" : "postgres",
"dbType" : "mysql",
"dbSettings" : {
"user" : "etherpaduser",
"host" : "localhost",
......@@ -101,7 +148,7 @@
/*
* The default text of a pad
*/
"defaultPadText" : "Bienvenue sur l'EtherPad d'Aurore !\n\nCe pad est public.\n",
"defaultPadText" : "Bienvenue sur 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!",
/*
* Default Pad behavior.
......@@ -119,7 +166,7 @@
"rtl": false,
"alwaysShowChat": false,
"chatAndUsers": false,
"lang": "fr-fr"
"lang": "en-gb"
},
/*
......@@ -366,6 +413,13 @@
*/
/*
* Expose Etherpad version in the web interface and in the Server http header.
*
* Do not enable on production machines.
*/
"exposeVersion": false,
/*
* The log level we are using.
*
* Valid values: DEBUG, INFO, WARN, ERROR
......
......@@ -17,7 +17,7 @@
"integrations_rest_url": "https://scalar.vector.im/api",
"integrations_jitsi_widget_url": "https://scalar.vector.im/api/widgets/jitsi.html",
"bug_report_endpoint_url": "https://riot.im/bugreports/submit",
"defaultCountryCode": "GB",
"defaultCountryCode": "FR",
"showLabsSettings": false,
"features": {
"feature_groups": "labs",
......
version: "3.7"
version: "3"
services:
riot:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment