Skip to content

BerkeleyLibrary/geodata

Repository files navigation

GeoData

GeoData is UC Berkeley Library's geospatial data portal, built with GeoBlacklight 5.3.

Geodata@UCB

Docker development

Install Docker with the Compose plugin before starting. Docker Compose automatically uses compose.yml for local development; compose.ci.yml is an overlay used by the GitHub Actions workflow.

Start the stack

# Build container images
docker compose build --pull

# Start the stack in the background
docker compose up -d

On startup, the one-shot updater service waits for PostgreSQL and Solr, prepares the development database, builds CSS, and seeds Solr. The app service starts only after the updater exits successfully.

Check startup status and troubleshoot initialization with:

docker compose ps
docker compose logs updater db solr

# Rerun initialization when needed
docker compose run --rm updater

Accessing services

Configuration

Local database, Solr, and Rails environment settings are defined in compose.yml. RAILS_ENV defaults to development and can be overridden from the shell.

The application also supports secrets mounted as files under /run/secrets. At startup, each nonempty file is loaded into an environment variable named after the file, but only when that variable is not already set. Explicit environment variables therefore take precedence over mounted secrets.

CSS development

The updater performs the initial CSS build. Rebuild after changing stylesheets, or run the watcher while actively developing CSS:

# One-time rebuild
docker compose exec app rails css:build

# Continuous rebuilds; stop with Ctrl-C
docker compose exec app yarn watch:css

Helpful commands

# Follow logs for every service or only the Rails application
docker compose logs -f
docker compose logs -f app

# Open a shell or Rails console
docker compose exec app bash
docker compose exec app rails console

Build the deployable final image. Production asset compilation and smoke tests run as part of this build:

docker build --target final -t geodata .

Stop and resume the existing containers while preserving their local state:

docker compose stop
docker compose start

Stop the stack and delete its local database, Solr data, and other volumes:

docker compose down -v

Deployment

Staging

Production

About

UC Berkeley Library's GIS and map discovery application

Resources

Stars

0 stars

Watchers

3 watching

Forks

Packages

 
 
 

Contributors