I am trying to figure out how running Docker with storage node and its config.yaml play together.
I would like to get rid of as many environment options in the Docker run command and rather have them in the config.yaml. I also want to move the storage data to a different location than the config.yaml.
So I wonder if I could run “docker exec -it storagenode /app/storagenode setup” with all the flags I want to set like:
It is just for simplification. It is easier set up a config file once and issue a simple run command rather than having a simple convig file and having to issue a complex run command any time you restart this thing.
I wouldn’t go that route. The docker image is built to be used with environment variables and assumes they are there. I think the entrypoint script assumes they exist as well, so you’ll likely run into more trouble than it’s worth. Especially since you can just save your run command in a bash script.
But if you want to know for sure, it’s open source code. Check out the github to see what you would need to change in order to make it work.
If you do that, then the sanest way is to simply extract the storagenode binary from Docker (or compile your own) and run it standalone.
You can then run “storagenode config --config-dir /where/ever/storj/config --edit-conf” to edit th thing (it’s quite well commented), “storagenode run …” to run your node, and “… dashboard …” for a simple textual dashboard. All rather simple.
Ok so the first attempts have not been successful. It seems to be trickier than I thought due to the own Docker filesystem that lives in the container and to map the to the host filesystem.
Namely having a storage folder separated from the config folder did not work but would be the way to have a setup that separate apps from configs from data.