-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix(docker): add working docker-compose with data volume #3183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)
Quality Gate Passed Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
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: