Installation - ccnmtl/footprints GitHub Wiki

REQUIREMENTS

Python 3.8
PostgresSQL with PostGIS geo-aware extensions
Solr 3+
Celery 3

NOTES

  • In development, Footprints can be configured to use an in-memory Celery configuration and a simple search backend.
  • Footprints uses SpatiaLite to run unit tests.
  • See the Local Solr Instance page for more information on how to develop on Footprints locally with a containerized Solr instance.

INSTALLATION

  1. If you are planning to contribute to the project, first fork the repository into your own account.

  2. Clone Footprints into your local development environment.

  3. Build the PostgresSQL database
    A. Make sure you have PostGIS installed and configured.
    B. Create the database createdb footprints

  4. Customize settings
    Create a local_settings.py file in the footprints subdirectory. Override the variables from settings_shared.py that you need to customize for your local installation. At a minimum, you will need to customize your DATABASES dictionary. See the example local_settings.py file for more information.

  5. Build Footprints uses a Makefile to control the build. Simply run make to build the virtualenv and run tests.

  6. Sync the database

    make migrate

  7. Run locally (during development only)
    make runserver

TROUBLESHOOTING

PostgreSQL configuration on MacOS

Error: pg_config executable not found.
   
    pg_config is required to build psycopg2 from source.  Please add the directory
    containing pg_config to the $PATH or specify the full executable path with the
    option:
   
        python setup.py build_ext --pg-config /path/to/pg_config build ...
   
    or with the pg_config option in 'setup.cfg'.
   
    If you prefer to avoid building psycopg2 from source, please install the PyPI
    'psycopg2-binary' package instead.

Solution: Add the directory containing pg_config to the $PATH. (reference)

Thanks to: @aaronhpriven

⚠️ **GitHub.com Fallback** ⚠️