tvelocity / dockerfiles

My collection of Dockerfiles for various services.
15 stars 39 forks source link

Etherpad: Settings.json malformed when environment variable contains double quote #20

Open pawohl opened 7 years ago

pawohl commented 7 years ago
There was an error processing your settings.json file: Unexpected string

is what you get when starting with, e.g.

docker run -d \
    --network ep_network \
    -e ETHERPAD_TITLE="The \"Etherpad" \
    -e ETHERPAD_DB_HOST=ep_mysql \
    -e ETHERPAD_DB_PASSWORD=password \
    -p 9001:9001 \
    tvelocity/etherpad-lite

A simple workaround is to double escape the quotes, however isn't yet documented and feels unintuitive. #19 has code delegating JSON formatting to nodejs. Attempting to JSON-encode in bash directly isn't working that well.

Additionally an extra comma is left in some situations right after the dbSettings, which isn't allowed by the JSON specification (etherpad works with them).

lupa18 commented 6 years ago

Maybe a simple advice: "All environment variable must be without quotes". Example of env file:

ETHERPAD_TITLE=your title without wuotes
ETHERPAD_DB_HOST=the-db-host
ETHERPAD_DB_USER=your-db-user
ETHERPAD_DB_PASSWORD=your-db-password
ETHERPAD_ADMIN_PASSWORD=your-password
ETHERPAD_ADMIN_USER=adminuser
ETHERPAD_API_KEY=whateveryouneedtoputhere