diff --git a/server/Dockerfile b/server/Dockerfile index 5a05e1c..4d8a4a4 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -78,6 +78,7 @@ ARG PHP_VER ssdeep \ libfuzzy2 \ mariadb-client \ + rsync \ # Python Requirements python3 \ python3-setuptools \ diff --git a/server/files/entrypoint_nginx.sh b/server/files/entrypoint_nginx.sh index 64ddab0..5f8cd16 100755 --- a/server/files/entrypoint_nginx.sh +++ b/server/files/entrypoint_nginx.sh @@ -88,6 +88,9 @@ init_mysql(){ } 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 } # Things we should do when we have the INITIALIZE Env Flag @@ -103,6 +106,8 @@ echo "Configure Cake | Change Redis host to $REDIS_FQDN ... " && setup_cake_conf # Things we should do if we're configuring MISP via ENV echo "Configure MISP | Initialize misp base config..." && init_misp_config +echo "Configure MISP | Sync app files..." && sync_files + echo "Configure MISP | Enforce permissions ..." echo "... chown -R www-data.www-data /var/www/MISP ..." && find /var/www/MISP -not -user www-data -exec chown www-data.www-data {} + echo "... chmod -R 0750 /var/www/MISP ..." && find /var/www/MISP -perm 550 -type f -exec chmod 0550 {} + && find /var/www/MISP -perm 770 -type d -exec chmod 0770 {} +