diff --git a/README.md b/README.md index 7cf61a0..648acf2 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Create a virtual environment and run it: ## Todo -- Get variables from environment to make it easier to deploy from systemd +- Take a list of items (POST in JSON?) ## License This work is licensed under the [GPLv3](https://www.gnu.org/licenses/gpl-3.0.en.html). diff --git a/app.py b/app.py index 9134290..0f16fed 100644 --- a/app.py +++ b/app.py @@ -3,10 +3,12 @@ # https://wiki.duraspace.org/display/DSPACE/Solr import falcon +import os from SolrClient import SolrClient -solr_server = 'http://localhost:3000/solr' -solr_core = 'statistics' +# Check if Solr connection information was provided in the environment +solr_server = os.environ.get('SOLR_SERVER', 'http://localhost:8080/solr') +solr_core = os.environ.get('SOLR_CORE', 'statistics') class ItemResource: def on_get(self, req, resp):