This website provides some information on the usage of Specify 6.
The UI for displaying the usage stats.
-
Clone this repository
-
Install Docker and Docker compose
-
Copy
./env.examplefile to./.envand change the variables as applicable -
Edit
docker-compose.ymlin all the places where you seeCHANGE THIS: -
Copy
./sp7-stats/config/auth.example.confto./sp7-stats/config/auth.confand change the variables as applicable. That would require you to create a GitHub OAuth App. See the instructions -
Generate
fullchain.pemandprivkey.pem(certificate and the private key) using Let's Encrypt and put (or symlink) these files into the./sp7-stats/config/directory.While in development, you can generate self-signed certificates:
openssl req \ -x509 -sha256 -nodes -newkey rsa:2048 -days 365 \ -keyout ./sp7-stats/config/privkey.pem \ -out ./sp7-stats/config/fullchain.pem
-
It is recommended to set up daily cron to the following location
http://<yourdomain>/cron/refresh_data.php. This will automatically unzip the files and compile the information so that users can get up to date data. -
It is also highly recommended to create indexes for
trackandtrackitemtables in thestatsdatabase:SHOW INDEX FROM `track`; # Show existing indexes for `track` SHOW INDEX FROM `trackitem`; # Show existing indexes for `trackitem` CREATE UNIQUE INDEX `track_index` on `track` (`trackid`,`ip`,`timestampcreated`); # Create indexes for `track` CREATE UNIQUE INDEX `trackitem_index` on `trackitem` (`trackid`,`name`,`value`,`countamt`); # Create indexes for `trackitem`
Start the containers: docker compose up -d
Start the containers:
docker-compose \ 2m 53s
-f docker-compose.yml \
-f docker-compose.development.yml \
up --buildIn development, MariaDB database is accessible outside Docker and a
./source-data/ directory is mounted into the container.
You can go over the other settings in the ./config/optional.php
and ./config/cache.php files and see if there is anything you would like to
adjust.
For example, you can change the duration of time before compiled data is
considered out of date by changing CACHE_DURATION.
The default value is set to 7
days
The endpoint for collecting incoming stats from Specify 6
The public directory is meant to be served at specify6-prod.nhm.ku.edu.
There were snippets of code/files from the following resources used:





