Skip to content
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

Fix docker volume persistent for directory of custom org images #95

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/logs/
/files/
/ssl/
/server-configs/
/server-configs/
/org_img/
/custom_img/
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ services:
- "./logs/:/var/www/MISP/app/tmp/logs/"
- "./files/:/var/www/MISP/app/files"
- "./ssl/:/etc/nginx/certs"
- "./org_img/:/var/www/MISP/app/webroot/img/orgs"
- "./custom_img/:/var/www/MISP/app/webroot/img/custom"
# - "./examples/custom-entrypoint.sh:/custom-entrypoint.sh" # Use the example custom-entrypoint.sh
environment:
- "HOSTNAME=https://localhost"
Expand Down
2 changes: 2 additions & 0 deletions server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ ARG PHP_VER
# Make a copy of the file store, so we can sync from it
RUN cp -R /var/www/MISP/app/files /var/www/MISP/app/files.dist

RUN cp -R /var/www/MISP/app/webroot/img/orgs /var/www/MISP/app/webroot/img/orgs.dist

# Make a copy of the configurations, so we can sync from it
RUN cp -R /var/www/MISP/app/Config /var/www/MISP/app/Config.dist

Expand Down
1 change: 1 addition & 0 deletions server/files/entrypoint_nginx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ sync_files(){
for DIR in $(ls /var/www/MISP/app/files.dist); do
rsync -azh --delete "/var/www/MISP/app/files.dist/$DIR" "/var/www/MISP/app/files/"
done
rsync -azh --delete "/var/www/MISP/app/webroot/img/orgs.dist/" "/var/www/MISP/app/webroot/img/orgs"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the --delete here will delete any org images uploaded by the user - can you verify that?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I verified and of course the --delte flag was wrong. Fixed it.

}

# Ensure SSL certs are where we expect them, for backward comparibility See issue #53
Expand Down