FITS as a microservice.
- Tomcat
- Composer
- Download the latest
fits.zipandfits.warfrom https://projects.iq.harvard.edu/fits/downloads. You may need to install a zip library to unzip the file. - Copy the
.warfile to your Tomcat webapps directory and test. - Edit the Tomcat
conf/catalina.propertiesfile by adding the following two lines to the bottom of the file:
fits.home=/\<path-to-fits>/fits
shared.loader=/\<path-to-fits>/fits/lib/*.jar- Restart Tomcat.
- Test the webservice with:
curl -k -F datafile="@/path/to/myfile.jpg" http://[tomcat_domain]:[tomcat_port]/fits/examine(note: the ‘@’ is required.)
- Clone this repository somewhere in your web root.
$ cd /path/to/CrayFitsand run$ composer install- For production, configure your web server appropriately (e.g. add a VirtualHost for CrayFits in Apache)
To run the microservice on the Symfony Console, enter:
php bin/console server:start *:8050in the microservice root folder.
The server is stopped with:
php bin/console server:stopOn a production machine you'd probably want to configure an additional port in Apache.
Note: The location of the FITS webserver is stored in the .env file in the
root dir of the Symfony app. This will have to be reconfigured if the FITS
server is anywhere other than localhost:8080/fits
To use Alpaca as an interface to this microservice, configure
an islandora-connector-derivative
appropriate to your installation of CrayFits.