dappnode / DNP_DAPPMANAGER

Dappnode package responsible for providing the Dappnode Package Manager
GNU General Public License v3.0
30 stars 40 forks source link

Use native `docker compose merge` functionality to merge compose properties #1983

Open pablomendezroyo opened 2 months ago

pablomendezroyo commented 2 months ago

Right now the dappmanager edits a lot of stuff from the compose file when installing a new package, see packageInstall and setDappnodeComposeDefaults. This edit is done using utilities such as lodash. The requirements of the docker compose file are docker specific and relying on developers for the knowledge required to handle and implement this requirement does not make sense.

Instead, use the docker compose merge utility to merge properties set by dappmanager.

An example of usage would be the docker aliases, the docker aliases for a docker network must be unique otherwise there will be an error when handling this docker compose file