This is the Python backend for GLAM. You can find the frontend at GlamGeoVis/GlamGeoMap.
Requires clusterer service to run (growing-glyphs#py4j).
- This repository contains a Dockerfile that can be used to create a Docker image. The provided nginx configuration file in
config/nginx.conf.templateprovides three endpoints, running on port 8000:- Trove backend endpoint
/trove - Risse backend endpoint
/risse - All other requests will be forwarded to
STATIC_FILES_URL, this is where the files for the frontend can be found (eg./index.htmlwill forward to{STATIC_FILES_URL}/index.html. This setting can be found inDockerfile, and is by default configured to an Amazon S3 bucket where the current build of theGlamGeoVis/GlamGeoMapmaster branch is automatically deployed.
- Trove backend endpoint
You can run either using Docker, or using a local python environment.
- Make sure
STATIC_FILES_URLinDockerfileis set to the frontend files' location (your local deployment ofGlamGeoVis/GlamGeoMapor Amazon S3). - Build the image
docker build . -t glam_server. - Run and bind to a local port eg.
docker run -it --name glam_server -p 127.0.0.1:8888:8000 glam_server. - Server is now running at http://localhost:8888.
- Use
python3 - Make a virtual environment.
- Install dependencies
pip install -r requirements.txt. - Set environmental variable
GLAM_DATA_FILEto the data filename eg.glammap-risse-dump-authors.csv(if not set, the script will try to openglammap-risse-dump-authors.csvby default). - Run using
python server.py. - Note that unlike the Docker setup, this will only serve a single API backend (so either Trove or Risse) on port
8000.