diff --git a/Makefile b/Makefile index 3feb00f1a..bfa6af4e0 100644 --- a/Makefile +++ b/Makefile @@ -420,8 +420,8 @@ 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 cp $$(docker compose ps -q drupal):/tmp/public-files.tgz $(DEST) + 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) # import Drupal's public files from zipped tarball diff --git a/sample.env b/sample.env index 9e8ac3b52..2fe530d60 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=.