Skip to content

Commit

Permalink
docker: move docker/settings.json to /settings.json.docker
Browse files Browse the repository at this point in the history
  • Loading branch information
muxator committed Nov 8, 2019
1 parent dc15f4a commit 30fd53f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ RUN bin/installDeps.sh && \
RUN for PLUGIN_NAME in ${ETHERPAD_PLUGINS}; do npm install "${PLUGIN_NAME}"; done

# Copy the configuration file.
COPY ./docker/settings.json /opt/etherpad-lite/settings.json
COPY ./settings.json.docker /opt/etherpad-lite/settings.json

# Follow the principle of least privilege: run as unprivileged user.
#
Expand Down
11 changes: 3 additions & 8 deletions doc/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,15 @@ If you want to use a personalized settings file, **you will have to rebuild your
All of the following instructions are as a member of the `docker` group.

### Rebuilding with custom settings
Prepare your custom `settings.json` file:
```bash
cd <BASEDIR>/docker
cp ../settings.json.template settings.json
[ further edit your settings.json as needed ]
```
Edit `<BASEDIR>/settings.json.docker` at your will. When rebuilding the image, this file will be copied inside your image and renamed to `setting.json`.

**Each configuration parameter can also be set via an environment variable**, using the syntax `"${ENV_VAR}"` or `"${ENV_VAR:default_value}"`. For details, refer to `settings.json.template`.

### Rebuilding including some plugins
If you want to install some plugins in your container, it is sufficient to list them in the ETHERPAD_PLUGINS build variable.
The variable value has to be a space separated, double quoted list of plugin names (see examples).

Some plugins will need personalized settings in the `settings.json` file. Just refer to the previous section, and include them in your custom `settings.json`.
Some plugins will need personalized settings. Just refer to the previous section, and include them in your custom `settings.json.docker`.

### Examples

Expand All @@ -56,7 +51,7 @@ And point your browser to `http://<YOUR_IP>:<DESIRED_PORT>`

## Options available by default

The `settings.json` available by default enables some configuration to be set from the environment.
The `settings.json.docker` available by default enables some configuration to be set from the environment.

Available options:

Expand Down
File renamed without changes.

0 comments on commit 30fd53f

Please sign in to comment.