fix(docker): add working docker-compose with data volume#3183
Conversation
| - ./:/usr/src/app | ||
| command: --log DEBUG | ||
| # keeps operation data & uploaded files between runs | ||
| - caldera-data:/usr/src/app/data |
There was a problem hiding this comment.
Is there a reason why we're only storing the data directory for Caldera and not all files like before? When testing this locally, I had an issue because my conf/local.yml file was not persisting between docker compose runs, causing issues with loading existing data.
There was a problem hiding this comment.
If I change the line to - caldera-data:/usr/src/app, I no longer get the decryption issue due to config file changes
There was a problem hiding this comment.
Basically what was happening is that unless you use the --insecure flag on Caldera startup, Caldera will look for the conf/local.yml config file and generate a new one if one doesn't exist. Since the config file contains the encryption settings for securing Caldera user data, restarting Caldera with a different config file will typically cause decryption issues since the encryption settings will be mismatched. So unless the config files are also included in the persistent volumes, users won't be able to recover previous data even though the data files technically still exist (just encrypted)
|
|
|
Closing — the conf/local.yml persistence issue raised in review is a real data-loss risk that would need to be addressed. Additionally, PR #3335 provides a more comprehensive Docker overhaul (multi-stage Dockerfile, build/dev/prod targets, ARM64 support) that supersedes this approach. Thank you for the contribution! |



Description
Add working docker-compose with data volume
Replace the full source bind-mount (which hid Magma UI assets and caused 'plugins/magma/dist/assets/' startup error) with a named volume mounted to /usr/src/app/data.
CALDERA now starts cleanly via 'docker compose up' and preserves operation data between runs.
Type of change
How Has This Been Tested?
docker compose up --build✅ CALDERA starts, UI accessible at http://localhost:8888.
docker compose down/up.Checklist: