docker-misp
docker-misp copied to clipboard
Organization logos do not persist after core container rebuilds
Can you add a bit of description? What kind of rebuild? Do you know where the files are stored?
https://github.com/MISP/MISP/blob/879c564d0c86f94c4e53b3a2e53243cc1d7a324c/app/Controller/OrganisationsController.php#L122
Looks like the Orgs get stored in ./app/webroot/img/orgs
of course, there's existing ones already so a direct volume-mount won't work.
Mounting the following paths works (fine) for me
-
/var/www/MISP/app/webroot/img/orgs
-
/var/www/MISP/app/webroot/img/custom
Uploading new images for organisations or misp customization is working, but the default PNG files are not created.
Right, when you mount those directories, to "removes" what's already there. I'm hoping MISP fixes how it accesses these images, but I may have todo the same as the data directories - Look for a hidden file, and if it's not there copy from an internal copy.
FWIW this is yet another reason why the web server should not scribble data into the filesystem. I've tried to argue that MISP should instead store data like organisation images in the MISP database, but with no success, see https://github.com/MISP/MISP/issues/7371
Storing blobs in a DB would erk the snot out of my DBAs. It's much easier for us to get large NFS storage then more disk space on a DB.
Scribbling stuff to filesystem is very normal practice.
I guess I'm not a database purist :) I definitely seem to be alone in my opinion that all site-specific data should be in one place, and the DB is for me the only reasonable choice. I make this argument to support replication/failover needs. That is complicated today bcos the MISP webapp writes event-attachment files to one folder (those can definitely be large) and reads organisation images from another folder (those are tiny), all in addition to the event/attr data in the DB of course.
If it can be volume mounted on a docker image, it can be done on an NFS drive and shared between instances. While I haven't tried it, a little tweaking of configurations these images (aside from Org Images) should just work.
@coolacid would you please consider extending the docker-compose.yml with a volume mount for org images:
- "./orgs/:/var/www/MISP/app/webroot/img/orgs"
And maybe you can add directions to pre-populate the local volume from the git repo, dir ~/git/github/MISP/app/webroot/img/orgs
arrives with this content:
ADMIN.png CERTat.png MIL.be.png NATO.png RISKIQ.png
CERT.at.png CIRCL.png MISP.png NCIRC.png
There already is a pull request for this project: https://github.com/coolacid/docker-misp/pull/95
Thanks @garrit-schroeder for the pointer, I commented there to say you might add a line or two in the README.md about preparing an org images volume. Anyhow I hope @coolacid will accept your PR to close this issue!