What's the recommended way to configure RESTHeart with docker-compose? #434
-
Hi! I'm using docker-compose and would like to override Is this the recommended way to it, or is there a way to only override some property in a separate file? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi, In this case, I suggest adopting a SNAPSHOT version of RESTHeart built from Then you can use the The reason is that RESTHeart v6 allows overriding configuration options with an environment variable only if the parameters are a primitive type. Taking into account the following configuration snipped: mongo-uri: mongodb://127.0.0.1
mongo-mounts:
- what: restheart
where: / The env var RH_MONGO_URI overrides the parameter mongo-uri. RESTHeart v7 introduces a new way to override variables via the environment variable RHO. An example is
or even
|
Beta Was this translation helpful? Give feedback.
Hi,
In this case, I suggest adopting a SNAPSHOT version of RESTHeart built from
master
branch. Our Docker images are available at https://hub.docker.com/r/softinstigate/restheart-snapshotThen you can use the
environment
directive in your docker-compose.yml to override the newRHO
environment variable. This would require a docker-compose restart command.The reason is that RESTHeart v6 allows overriding configuration options with an environment variable only if the parameters are a primitive type.
Taking into account the following configuration snipped:
The env var RH_MONGO_URI overrides the parameter mongo-uri.
…