Skip to content
This repository has been archived by the owner on Nov 19, 2020. It is now read-only.

Commit

Permalink
[NRGI/resource-projects-etl#48] Set default-graph-uri from an env var
Browse files Browse the repository at this point in the history
  • Loading branch information
Bjwebb committed Oct 22, 2015
1 parent 89bb34f commit cdc2f5e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions settings.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
}

$conf['endpoint']['local'] = 'SPARQL_ENDPOINT';
$conf['endpointParams']['config'] = array(
'default-graph-uri' => 'DEFAULT_GRAPH_URI'
);
$conf['home'] = '/var/www/html/lodspeakr/';
$conf['basedir'] = 'BASE_URL';
$conf['debug'] = false;
Expand Down
2 changes: 2 additions & 0 deletions start.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#!/bin/bash
# If we need to we can do substitutions from environment variables
# in the config file
SPARQL_ENDPOINT=${SPARQL_ENDPOINT:-"http://virtuoso:8890/sparql"}
/bin/sed -i "s|BASE_URL|${BASE_URL}|" settings.inc.php
/bin/sed -i "s|SPARQL_ENDPOINT|${SPARQL_ENDPOINT}|" settings.inc.php
/bin/sed -i "s|DEFAULT_GRAPH_URI|${DEFAULT_GRAPH_URI}|" settings.inc.php
if [ $DEBUG ]; then
/bin/sed -i "s|\$conf\['debug'\] = false;|\$conf\['debug'\] = true;|" settings.inc.php
fi
Expand Down

0 comments on commit cdc2f5e

Please sign in to comment.