diff --git a/distillery/resources/compose/barrel/Dockerfile b/distillery/resources/compose/barrel/Dockerfile index d39c3d6..1a07696 100644 --- a/distillery/resources/compose/barrel/Dockerfile +++ b/distillery/resources/compose/barrel/Dockerfile @@ -91,6 +91,7 @@ VOLUME /var/www/data # Add and configure the entrypoint ADD scripts/entrypoint.sh /entrypoint.sh +ADD scripts/create_adapter.php /create_adapter.php ENTRYPOINT [ "/entrypoint.sh" ] CMD ["apache2-foreground"] diff --git a/distillery/resources/compose/barrel/scripts/create_adapter.php b/distillery/resources/compose/barrel/scripts/create_adapter.php new file mode 100644 index 0000000..cfa74b5 --- /dev/null +++ b/distillery/resources/compose/barrel/scripts/create_adapter.php @@ -0,0 +1,61 @@ +getStorage('wisski_salz_adapter'); +$adapter = $storage->create([ + "id" => $id, + "label" => $label, + "description" => $description, +]); +$adapter->setEngineConfig([ + "id" => $type, + "machine-name" => $machine_name, + "header" => $header, + "writeable" => $writable, + "is_preferred_local_store" => $is_preferred_local_store, + "read_url" => $read_url, + "write_url" => $write_url, + "is_federatable" => $is_federatable, + "default_graph" => $default_graph_uri, + "same_as_properties" => $same_as_properties, + "ontology_graphs" => $ontology_graphs, +]); +$adapter->save(); \ No newline at end of file diff --git a/distillery/resources/compose/barrel/scripts/provision_container.sh b/distillery/resources/compose/barrel/scripts/provision_container.sh index 24475f3..7fde29a 100644 --- a/distillery/resources/compose/barrel/scripts/provision_container.sh +++ b/distillery/resources/compose/barrel/scripts/provision_container.sh @@ -129,21 +129,14 @@ log_info " => Enable Wisski modules" drush pm-enable --yes wisski_core wisski_linkblock wisski_pathbuilder wisski_adapter_sparql11_pb wisski_salz drupal_sites_permission_workaround +log_info " => Setting up WissKI Salz Adapter" +drush php:script /create_adapter.php "$INSTANCE_DOMAIN" "$GRAPHDB_REPO" "$GRAPHDB_HEADER" + log_info " => Provisioning is now complete. " log_ok "Your installation details are as follows:" function printdetails() { echo "URL: http://$INSTANCE_DOMAIN" echo "Username: $DRUPAL_USER" echo "Password: $DRUPAL_PASS" - log_info " => Your GraphDB details (for WissKI Salz) are: " - echo "Read URL: http://triplestore:7200/repositories/$GRAPHDB_REPO" - echo "Write URL: http://triplestore:7200/repositories/$GRAPHDB_REPO/statements" - echo "Username: $GRAPHDB_USER" - echo "Password: $GRAPHDB_PASSWORD" - echo "Authorization Header: $GRAPHDB_HEADER" - echo "Writable: yes" - echo "Default Graph URI: http://$INSTANCE_DOMAIN/#" - echo "Ontology Paths: (empty)" - echo "SameAs property: http://www.w3.org/2002/07/owl#sameAs" } printdetails