Skip to content

Local Development Quickstart

Michael Berkowski edited this page Jun 25, 2020 · 5 revisions

Geoblacklight should be fairly easy to run.

# Clone the repository, and cd into it
$ git clone git@github.com:BTAA-Geospatial-Data-Project/geoportal.git
$ cd geoportal

# Create a local mysql database for the geoportal development
# Name it something like: geoportal_development (rails convention)

# Configure your DotEnv files
# .env.test and .env.development
$cp .env.test.example .env.test
$cp .env.development.example .env.development
# Update these files to include your database and solr connections

# Bundle dependencies
$ bundle install

# Database initialization
$ bundle exec rake db:migrate

# Run the application
# Will start Solr on localhost:8983 and populate it with the fixture docs
# Will start Puma on 0.0.0.0:3000, 
$ bundle exec rake geoportal:server

# Alternatively,run the server on a specific network interface or port
# GEOPORTAL_SERVER_BIND_INTERFACE=<ip address of interface>
# GEOPORTAL_SERVER_PORT=<alternate puma port>

$ GEOPORTAL_SERVER_BIND_INTERFACE=127.0.0.1 GEOPORTAL_SERVER_PORT=3005 bundle exec rake geoportal:server

If everything went correctly, you are now running the B1G Geoportal locally at http://localhost:3000

Use Control-C to stop the application.

Run the application test suite now

# Run the test suite
$> RAILS_ENV=test bundle exec rake ci

If you can run the application and run the test suite successfully, you're ready to start contributing code.

Clone this wiki locally