Merge erdnaxe docker into Aurore

This commit is contained in:
Alexandre Iooss 2019-11-01 11:32:07 +01:00
parent f2945bfb1f
commit fe16b6c810
No known key found for this signature in database
GPG key ID: 6C79278F3FCDCC02
12 changed files with 131 additions and 145 deletions

View file

@ -1,60 +0,0 @@
# Etherpad Lite Dockerfile
#
# https://github.com/ether/etherpad-docker
#
# Author: muxator
#
# Version 0.1, patched by Aurore
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"]

View file

@ -1,11 +1,15 @@
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

1
etherpad/example.env Normal file
View file

@ -0,0 +1 @@
POSTGRES_PASSWD=asupersecurepassword

View file

@ -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 Aurore",
"title": "Etherpad",
/*
* favicon default name
@ -19,6 +59,15 @@
"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",
@ -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:
*
* 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",
/*
* Database specific settings (dependent on dbType).
*
* Remember that since Etherpad 1.6.0 you can also store these informations in
* credentials.json.
*/
"dbSettings" : {
"user" : "etherpad",
"user" : "${POSTGRES_USER}",
"host" : "10.128.0.31",
"port" : 5432,
"password": "CHANGE ME IN PROD !",
"database": "etherpad"
"password": "${POSTGRES_PASSWORD}",
"database": "${POSTGRES_DB}"
},
/*
@ -87,7 +134,7 @@
*/
/*
"dbType" : "postgres",
"dbType" : "mysql",
"dbSettings" : {
"user" : "etherpaduser",
"host" : "localhost",
@ -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