0

The Stellar quickstart contains a config file at stellar/core/etc/stellar-core.cfg which it uses by default to start stellar core once the container is first run.

How can do a first run of the stellar core using another tailor-made config file for our production instance of stellar core with the configurations required?

Is there a way to pass in another config file to be used when executing the docker run command on the container?

In other words, a way to pass in the configuration file from the host (instead of running stellar-core run --conf betterfile.cfg inside the container)?

Thanks for any help.

1
  1. You can enter the docker container with docker exec -it stellar /bin/bash
  2. Then enter supervisorctl
  3. and then enter stop stellar-core. This will stop stellar-core.
  4. Enter exit to exit supervisor.
  5. Then edit the stellar-core.cfg file in the base directory of the docker container.
  6. Type supervisorctl again and type start stellar-core
  • Thanks. Does this method also work for the other config files for the Horizon, Postgresql or Supervisor services? e.g. stopping and starting horizon with edits to the horizon.env file? – John Murphy Feb 1 at 10:09
  • Yes it does work for all of them – Drew Patel Feb 14 at 1:28
1

You can try to mount your config file to the container https://docs.docker.com/storage/volumes/

So you can try to do something like docker run -v myconfigfile.cfg /path/to/config/file/in/container

1

We have successfully customized our stellar-core configuration by following the documentation of https://hub.docker.com/r/stellar/quickstart/

To customize the configurations that both stellar-core and horizon use, you must use persistent mode. The default configurations will be copied into the data directory upon launching a persistent mode container for the first time.

It is recommended that you stop the container before editing any of these files, then restart the container after completing your customization.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.