The Library Registry is a WSGI-compliant Python/Flask web application which relies on a PostgreSQL database running the PostGIS geographic extension(s). It is served by the gunicorn WSGI server, behind an Nginx reverse proxy. Though the Docker containers are based on Alpine Linux, the Registry should be installable on most modern operating systems.
The instructions below assume familiarity with your system's package management, and the ability to troubleshoot issues that may arise while building software from source. Installing the Registry via Docker containers is the recommended path, so this is only a loose guide (and heavily informed by the Dockerfile).
During the install process, you are likely to need your system's equivalent of the following packages, plus those listed below under 'Runtime Dependencies'. The build dependencies may safely be removed after installation.
build-base/build-essentialbzip2-devlibffi-devlibxslt-devnpmopenssl-devpostgresql-devzlib-devmakepython2(required for building some very old npm packages)
The following system packages should not be removed after installation is complete, as they are required by various parts of the application stack:
libpqjpeg-devlibxcb-dev
The Registry requires a PostgreSQL 12+ server, and the PostGIS extension at 3.1+. Once you install those, connect as your Postgres admin user, and execute the SQL statements in the postgis_init.sh file. This will create the databases and users the application needs, and install the correct extensions.
To proxy incoming requests to the gunicorn WSGI server, you will need to install Nginx 1.19+. Use a modified version of the nginx.conf file to route requests to the WSGI server.
The Registry runs on Python 3.12, though it is likely compatible with earlier Python3 versions as well. Once you install Python, you'll be able to set up a virtual environment to install Python dependencies into.
Python package management for the Registry is via pipenv, which can be installed with python3 -m pip install pipenv.
To create the project's virtual environment and install the Python dependencies to it, you can run
pipenv installin the root of this repository.
The administrative webapp served at /admin is a single-page JavaScript application, and is served directly by the Nginx proxy server. To build the application, run the following in the repository root:
npm installIn the resulting node_modules directory, the static assets for the front end will be contained in simplified-registry-admin/dist, and should be copied to a location where Nginx knows to find them. In the containerized application this is /simplye_static, but can be anywhere as long as the Nginx config file is amended to point to that location.
In the containerized version of the Registry, process management is via supervisord, though you could control the various pieces as system services, or via a custom script. It may be helpful to look at the supervisord-alpine.ini configuration file, and adjust that for your local system.
Note that the supervisor configuration does not cover controlling the PostgreSQL server, which you will need to manage separately.