diff --git a/.gitignore b/.gitignore index 1cd1499..fcbe699 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,8 @@ /data/gingr/ready/* /data/gingr/processed/* /data/gingr/failed/* +/data/gingr/processing/* + /solr/geodata-test/data /solr/geodata-test/data diff --git a/data/gingr/processing/.keep b/data/gingr/processing/.keep new file mode 100644 index 0000000..e69de29 diff --git a/docker-compose.yml b/docker-compose.yml index 054ffb1..32682cf 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,7 +16,6 @@ services: GEOSERVER_URL: http://admin:geoserver@geoserver:8080/geoserver/rest/ SOLR_URL: http://solr:8983/solr/geodata-test SPATIAL_ROOT: data/spatial/ - PROCESSING_ROOT: data/processing/ restart: no volumes: - ./:/opt/app:delegated diff --git a/lib/gingr/cli.rb b/lib/gingr/cli.rb index 193d1dd..d046389 100644 --- a/lib/gingr/cli.rb +++ b/lib/gingr/cli.rb @@ -88,7 +88,9 @@ def unpack(zipfile) Config.default_options[:spatial_root]) DataHandler.geoserver_root = options[:geoserver_root] || ENV.fetch('GEOSERVER_ROOT', Config.default_options[:geoserver_root]) - DataHandler.processing_root = ENV.fetch('PROCESSING_ROOT', Config.default_options[:processing_root]) + + gingr_watch_root_dir ||= ENV['GINGR_WATCH_DIRECTORY'] || '/opt/app/data/gingr' + DataHandler.processing_root = File.join(gingr_watch_root_dir, 'processing') DataHandler.extract_and_move(zipfile_path) end diff --git a/lib/gingr/config.rb b/lib/gingr/config.rb index cc02424..98f5b08 100644 --- a/lib/gingr/config.rb +++ b/lib/gingr/config.rb @@ -19,7 +19,7 @@ module Config spatial_url: 'https://spatial.lib.berkeley.edu', spatial_root: 'data/spatial/', geoserver_root: 'data/geoserver/', - processing_root: 'data/processing/', + # processing_root: 'data/gingr/processing/', solr_url: 'http://solr:8983/solr/geodata-test' }