This tutorial describes the basic steps to develop a specific Semantic Container by extending the semantic base container. Refer to the Tutorial-Overview for other aspects.
For most use cases the following template provides a scaffold to create a specialized Semantic Container: https://github.com/sem-con/template
git clone https://github.com/sem-con/template.git
Use the following checklist to make the necessary changes:
- specify repository and container name in
build.sh
- add any necessary software components in the
Dockerfile
you might also want to add gems in theGemfile
- use as starting point the version from the base container - implement a custom method for responding to
GET /api/data
by editingapp/helpers/data_access_helper.rb
- if you want to provide additional API endpoints edit
config/routes.rb
and implement the controller inapp/controllers/api/v1
- to provide custom container initialization edit the
script
directory - by convention it is sensible to provide a default
init.trig
and commands for running the container intest
After you have implemented the new functionality the Semantic Container can be built with the following command in the root directory:
./build.sh
This downloads the current base container and applies the provided changes to create derived Semantic Container. Start the container with docker run -p 3000:3000 repo/sc-name
and start testing.
Here are some links to examples for extending the base container:
- sc-seismic: annotates a open data source and makes it avaialable as Semantic Container
- sc-sparql: integrate another service and extend the Semantic Container with additional API endpoints
- sc-sentinel: demonstrates asynchronous processing and process pipelines