mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-02-01 03:12:42 +01:00
6d400050a3
All the configuration values can be read from environment variables using the syntax "${ENV_VAR_NAME}". This is useful, for example, when running in a Docker container. EXAMPLE: "port": "${PORT}" "minify": "${MINIFY}" "skinName": "${SKIN_NAME}" Would read the configuration values for those items from the environment variables PORT, MINIFY and SKIN_NAME. REMARKS: Please note that a variable substitution always needs to be quoted. "port": 9001, <-- Literal values. When not using substitution, "minify": false only strings must be quoted: booleans and "skin": "colibris" numbers must not. "port": ${PORT} <-- ERROR: this is not valid json "minify": ${MINIFY} "skin": ${SKIN_NAME} "port": "${PORT}" <-- CORRECT: if you want to use a variable "minify": "${MINIFY}" substitution, put quotes around its name, "skin": "${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. Resolves #3543
51 lines
1.6 KiB
Markdown
51 lines
1.6 KiB
Markdown
# Docker image
|
|
|
|
This directory contains the files that are used to build the official Docker image on https://hub.docker.com/r/etherpad/etherpad.
|
|
|
|
# Rebuilding with custom settings
|
|
In order to use a personalized settings file, **you will have to rebuild your image**.
|
|
|
|
All of these instructions are as a member of the `docker` group.
|
|
|
|
Prepare your custom `settings.json` file:
|
|
```bash
|
|
cd <BASEDIR>/docker
|
|
cp ../settings.json.template settings.json
|
|
[ further edit your settings.json as needed]
|
|
```
|
|
|
|
**Each configuration parameter can also be set via an environment variable**, using the syntax `"${ENV_VAR_NAME}"`. For details, refer to `settings.json.template`.
|
|
|
|
Build the version you prefer:
|
|
```bash
|
|
# builds latest development version
|
|
docker build --tag <YOUR_USERNAME>/etherpad .
|
|
|
|
# builds latest stable version
|
|
docker build --build-arg ETHERPAD_VERSION=master --tag <YOUR_USERNAME>/etherpad .
|
|
|
|
# builds a specific version
|
|
docker build --build-arg ETHERPAD_VERSION=1.7.5 --tag <YOUR_USERNAME>/etherpad .
|
|
|
|
# builds a specific git hash
|
|
docker build --build-arg ETHERPAD_VERSION=4c45ac3cb1ae --tag <YOUR_USERNAME>/etherpad .
|
|
```
|
|
|
|
# Downloading from Docker Hub
|
|
If you are ok downloading a [prebuilt image from Docker Hub](https://hub.docker.com/r/etherpad/etherpad), these are the commands:
|
|
```bash
|
|
# gets the latest published version
|
|
docker pull etherpad/etherpad
|
|
|
|
# gets a specific version
|
|
docker pull etherpad/etherpad:1.7.5
|
|
```
|
|
|
|
# Running your instance:
|
|
|
|
To run your instance:
|
|
```bash
|
|
docker run --detach --publish <DESIDERED_PORT>:9001 <YOUR_USERNAME>/etherpad
|
|
```
|
|
|
|
And point your browser to `http://<YOUR_IP>:<DESIDERED_PORT>`
|