-
Type: Improvement
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 9.1
-
Component/s: Docker Image
-
Epic Link:
-
Sprint:nxcloud 9.1.7, nxcloud 9.1.8
-
Story Points:8
The Docker image uses environment variables to handle its configuration. This is done with the docker-entrypoint.sh shell script and is not accurate especially if we want to add additional variables.
New configuration proposal
Add a docker template which nuxeo.default could be done like that :
nuxeo.db.host=${env:NUXEO_DB_HOST:localhost} nuxeo.db.name=${env:NUXEO_DB_NAME:nuxeo} nuxeo.db.user=${env:NUXEO_DB_USER:nuxeo} nuxeo.db.password=${env:NUXEO_DB_PASSWORD:nuxeo}
The only drawback is that sometimes, features are just enabled by setting a value (case for nuxeo.redis.host that enable Redis). Are we capable of doing some if statements in the nuxeo.defaults or define some special behavior when the env variable is not set so that
nuxeo.redis.host=${env:NUXEO_REDIS_HOST}
doesn't set the configuration at all.
NB: after all, the value will be kept in this case, with an empty value.
Actions
Some environment variable may also do some actions like installing hotfixes or Nuxeo packages, creating the transient store folder....
- NUXEO_PACKAGES
- NUXEO_HOTFIX
- NUXEO_TRANSIENT_STORE
For the hotfix and packages, we could embed something in nuxeoctl directly based on an env variable.
For the setup of transient store, it could create the folder itself but there may be rights issues.
Another thing is that we could also define a folder in which we would put Nuxeo Packages (so already downloaded) that should be installed.
CLID
This is not in nuxeo.conf, but it could be achieved with the Docker template and a configuration variable.
But we could probably find something better suited, in order to register the instance on Connect upon start rather than using a pre generated CLID now that we have a nuxeoctl register command.
- depends on
-
NXP-29392 Allow environment variables replacement within Nuxeo templates
- Resolved