Ride-The-Lightning / c-lightning-REST

REST APIs for Core Lightning written with node.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Document docker setup with config file mounting

ShahanaFarooqui opened this issue · comments

Document docker setup with config file mounting

I'm running into this issue to. The docker image overwrites the config on every start. I tried to bind the config as read only to prevent this but the image will no longer start due to the error below.

./docker-entrypoint.sh: line 4: can't create cl-rest-config.json: Read-only file system

You unconditionally overwrite the file here:

cat <<-EOF > "cl-rest-config.json"
{
"PORT": $PORT,
"DOCPORT": $DOCPORT,
"PROTOCOL": "$PROTOCOL",
"EXECMODE": "$EXECMODE",
"RPCCOMMANDS": "$RPCCOMMANDS"
}
EOF

A workaround for the time being (if you're using docker-compose) it to override the docker entrypoint. Add the following to your docker-compose.yml:

entrypoint: node cl-rest.js