Browse documentation for IT-systems used by the European Environment Agency and the Eionet network.
1.1 Getting the latest release up
shell> git clone https://github.com/eea/eea.docker.sds.git cd eea.docker.sds
The Virtuoso is already configured. In order to reconfigure the Virtuoso, one needs to use file virtuoso.ini and set the parameters to needed settings.
1.2 Setting up shared folders, required for uploading files and harvesting rdfs
The docker-compose file is configured to use established shared folders. To actually use a different shared folder between Virtuoso and SDS app, you have to set them from volumes zone:
- /var/local/cr3/files:/var/local/cr3/files:z - /var/backups/sql:/var/backups/sql:z - /var/tmp:/var/tmp:z
After, if needed, specify updated path folders in virtuoso.ini file on DirsAllowed parameters.
If you need to modify the default path of temporary database, you can add a busybox data container with the needed path inside container and change the Databasefile parameter from Tempdatabase section in virtuoso.ini file. Or, if you want only a folder on host, add a volume in virtuoso container, mapped to specified folder, inside the docker-compose file.
1.3 Development setup
For development purposes you need to expose port 1112, in order to run integration tests in Maven.
1.4 Starting Virtuoso container for the first time
shell> docker-compose up
2.1 Remove the default data files
In other terminal, you have to delete all the files related to data:
shell> docker exec eeadockersds_virtuoso_1 find /virtuoso_db/ -type f ! -name '*.ini' -delete
2.2 Copy the existing virtuoso.db from the mounted volume with data
docker run --rm \ --volumes-from eeadockersds_virtuoso_data_1 \ --volume <mounted-data-folder>/virtuoso.db:/restore/virtuoso.db:ro \ busybox \ sh -c "cp -r /restore/virtuoso.db /virtuoso_db && \ chown -R 500:500 /virtuoso_db"
2.3 Restart the container
shell> docker-compose stop docker-compose up -d --no-recreate
Now you have docker container with Virtuoso, connected to datacontainer with latest database. Next, we need to build the SDS application.
SDS runs on the Java platform, and has been tested to run on Tomcat Java Servlet Container. SDS source code is built with Maven. Please download all of these software and install them according to the instructions found at their websites. The necessary versions are as follows:
Clone SDS source code into /var/local/deploy directory with next instruction.
shell> git clone https://github.com/eea/eionet.contreg.git cd eionet.contreg/
Before you can build SDS source code, you need to set your environment
specific properties. For that, make a copy of unittest.properties in
eionet.contreg/, and rename it to local.properties. Go through the resulting
file and change properties that are specific to your environment or wishes.
Each property’s exact meaning and effect is commented in the file.
Now you are ready to build your SDS code with Maven. The following command
assumes that Maven’s executable (mvn) is on the command path, and that it is
run while being in
shell> mvn -Dmaven.test.skip=true clean install
If the build went well, the cr.war file will be available in
eionet.contreg/target/ directory. You have to do is to simply copy that file
webapps/ directory. Rename it with ROOT.war if there isn’t any
other application in
Before you run Tomcat, you need to change the way Tomcat handles URI encoding.
By default, it uses ISO-8859-1, but SDS needs UTF-8. Therefore make sure that
<Connector/> from server.xml has the following attributes:
Once Tomcat is running, open SDS in the browser. It’s application context path is cr/, or /, unless you renamed cr.war.