I'm an Umbrel active contributor and I'm currently looking into a Docker implementation, following Umbrel requirements (e.g. prebuilt images). I've a few questions regarding this.
Here is an example of what it could look like. Please note that this is an early not-working version.
Configuration logic
Your install guide specifies that the build command (npm run build) has to be executed every time a configuration JSON file is modified. This command corresponds to the following:
which compile Typescript files and copy configuration files from json and tests to the dist dir.
Does this need to be run even if the config files paths are not set to default (i.e. ION_BITCOIN_CONFIG_FILE_PATH, ION_BITCOIN_VERSIONING_CONFIG_FILE_PATH, ION_CORE_CONFIG_FILE_PATH, ION_CORE_VERSIONING_CONFIG_FILE_PATH are set to custom values)? If not, would it be possible to run the tsc only once on build? This allows to build ion in the Dockerfile instead of at each run (exemple of simple entrypoint), and to run the container more deterministically (less chance for the container to fail because of a possible build error).
Persistent data
What directories or files need to be persisted between sessions (i.e. saved to the host filesystem)? Is persisting mongo database and ipfs directory enough, or is there anything else I'm missing?
You are correct that if you override the config file paths through environment variables, then there is no need to rebuild every time config parameters are modified. The guide didn't want to get into the nuisance for beginners, thus offers fool-proof instructions, but feel free to submit a PR if you think this info would actually be useful.
Hey!
I'm an Umbrel active contributor and I'm currently looking into a Docker implementation, following Umbrel requirements (e.g. prebuilt images). I've a few questions regarding this.
Here is an example of what it could look like. Please note that this is an early not-working version.
Your install guide specifies that the build command (
npm run build
) has to be executed every time a configuration JSON file is modified. This command corresponds to the following:https://github.com/decentralized-identity/ion/blob/11481c35ca9af3a4bb9390b92501567d22fd3270/package.json#L54
which compile Typescript files and copy configuration files from
json
andtests
to thedist
dir.Does this need to be run even if the config files paths are not set to default (i.e.
ION_BITCOIN_CONFIG_FILE_PATH
,ION_BITCOIN_VERSIONING_CONFIG_FILE_PATH
,ION_CORE_CONFIG_FILE_PATH
,ION_CORE_VERSIONING_CONFIG_FILE_PATH
are set to custom values)? If not, would it be possible to run thetsc
only once on build? This allows to buildion
in the Dockerfile instead of at each run (exemple of simple entrypoint), and to run the container more deterministically (less chance for the container to fail because of a possible build error).What directories or files need to be persisted between sessions (i.e. saved to the host filesystem)? Is persisting
mongo
database andipfs
directory enough, or is there anything else I'm missing?Dedicated issue: #189
Thanks!