Troggle is the software which runs the the expo cave survey data management and website. It is not the only thing running on the expo server.
This is the folder structure of the repo :expoweb: which is also the root of the website. Note that the webserver (apache) presents many more apparent folders, such as expofiles, than there are folders because that's what it and troggle do.
In the list below only the handbook folder has been expanded. The years folder includes
42 subfolders from 1976 to 2019.
The handbook illustrates the i/t/l idiom whereby an image file (i) is displayed with a paragraph of text as an HTML file (l) and there is a thumbnail image (t) which is included in another document, e.g. see the photographic guide to the walk from the toll road car park.
The expoweb repo contains all the HTML files and basic CSS files. The troggle repo contains the HTML templates, CSS for the troggle report pages generated dynamically and a copy of the CSS, thumbnail images and javascript for the Django admin package which has to be available under the url '/site_media/' (which resolves to expo/troggle/media/) for the admin system to work.
See the live report on which urls resolve to which actual folders at pathsreport.
/usr/share/javascript
which are used by some expoweb pages:
Currently installed on the server (October 2021) are the following javascript packages which are not used at all by troggle or any of the expo website:
Presumably these are used by something else hosted on the server ? Anyway, if you are setting up a new troggle sever you don't need them.
The server configuration scripts are in the file troggle/debian/serversetup and are also documented with notes in troggle/README.txt. It is intended that the full documentation will be copied here in due course.
It is hoped that we will develop fully automated server setup scripts (such as are used by CUYC for their Django system)
The folder structure on the server is as shown below. It is all
in the user folder for the user expo i.e. in
/home/user/expo:
expofiles contains ~40GB of files which are published by the webserver but which are not parsed by troggle. 28GB of these are photographs in /expofiles/photos/ and there are over 4GB of scanned images of surveys in /expofiles/surveyscans/. There is a cleaned, complete copy of the documentation for the tunnelX cave plan drawing package in /expofiles/tunnelwiki/.
The server runs it's hourly, daily and weekly scripts using the anacron system. In ~expo/config/cron/ on the server, there are expo.hourly and expo.daily scripts and these are (or should be) launched at the appropriate times by the server root from /etc/crontab. This is not obviously working on the server at present.
Installed independently of troggle simply with apt install xapian-omega and
then configured into the troggle-generated menus in css/main2.css. The function is
connected with an apache configuration
ScriptAlias /search /usr/lib/cgi-bin/omega/omega
in ~expo/config/apache/expo.conf.
Installed by Wookey in May 2020.
For high volume use, Troggle should be run using a web server like apache. However, a quick way to get started is to use the development server built into Django. This is limited though: directory redirection needs apache so CodeMirror and CaveView won't work as the url /javascript/ will not exist.
To do this, run
$ python manage.py runserver 8000 -v 3
from the troggle directory. This runs it on port 8000 so you see the website
at http://localhost:8000/
gunicorn also works. This runs with 9 workers (suitable for a 4-core processor,
-w takes n+1 where n is the number of cores of your processor):
$ gunicorn --reload -w 9 -b :8000 wsgi
This is a perl script, and served by the webserver using the url apache configuration
in ~expo/config/apache/expo.conf.
#bank of expo
#current expedition
ScriptAlias /boe /home/expo/boe/boc/boc.pl
<Directory /home/expo/boe/boc>
AddHandler cgi-script .pl
SetHandler cgi-script
Options +ExecCGI
Require all granted
</Directory>