From ac728198593e233f67a5b141dfdb72ed298d0bff Mon Sep 17 00:00:00 2001 From: joshdentremont Date: Thu, 18 May 2023 14:28:33 -0300 Subject: [PATCH 1/2] fix for public file export path --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 230032f8f..29919b48b 100644 --- a/Makefile +++ b/Makefile @@ -418,7 +418,7 @@ drupal-public-files-dump: ifndef DEST $(error DEST is not set) endif - docker-compose exec -T drupal with-contenv bash -lc 'tar zcvf /tmp/public-files.tgz /var/www/drupal/web/sites/default/files' + docker-compose exec -T drupal with-contenv bash -lc 'tar zcvf /tmp/public-files.tgz -C /var/www/drupal/web/sites/default/files .' docker cp $$(docker-compose ps -q drupal):/tmp/public-files.tgz $(DEST) From 872b3aeb84d4ba9d44c9ac9e77e8aaf69e796930 Mon Sep 17 00:00:00 2001 From: Josh d'Entremont Date: Wed, 24 May 2023 16:10:13 -0300 Subject: [PATCH 2/2] added ability to spcificy directory when dumping public files to tar --- Makefile | 2 +- sample.env | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 29919b48b..2ce2ff14b 100644 --- a/Makefile +++ b/Makefile @@ -418,7 +418,7 @@ drupal-public-files-dump: ifndef DEST $(error DEST is not set) endif - docker-compose exec -T drupal with-contenv bash -lc 'tar zcvf /tmp/public-files.tgz -C /var/www/drupal/web/sites/default/files .' + docker-compose exec -T drupal with-contenv bash -lc 'tar zcvf /tmp/public-files.tgz -C /var/www/drupal/web/sites/default/files ${PUBLIC_FILES_TAR_DUMP_PATH}' docker cp $$(docker-compose ps -q drupal):/tmp/public-files.tgz $(DEST) diff --git a/sample.env b/sample.env index aec02bcdd..8254041b2 100644 --- a/sample.env +++ b/sample.env @@ -197,3 +197,9 @@ WATCHTOWER_MEMORY_LIMIT=2G CANTALOUPE_DELEGATE_SCRIPT_ENABLED=false CANTALOUPE_DELEGATE_SCRIPT_PATHNAME=/opt/tomcat/bin/delegates.rb CANTALOUPE_HTTPSOURCE_LOOKUP_STRATEGY=BasicLookupStrategy + +# Path to include in tar file for exported public files +# If set to . the files will be exported wherever you specify as DEST +# when running make drupal-public-files-import +# If set to anything else, that path will be added to DEST +PUBLIC_FILES_TAR_DUMP_PATH=.