Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document docker setup with config file mounting #172

Open
ShahanaFarooqui opened this issue May 6, 2023 · 3 comments
Open

Document docker setup with config file mounting #172

ShahanaFarooqui opened this issue May 6, 2023 · 3 comments
Assignees

Comments

@ShahanaFarooqui
Copy link
Collaborator

Document docker setup with config file mounting

@ShahanaFarooqui ShahanaFarooqui self-assigned this May 6, 2023
@FallingSnow
Copy link

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

@FallingSnow
Copy link

You unconditionally overwrite the file here:

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

@FallingSnow
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants