What's new in Blacklight

Justin Coyne

Stanford Libraries

Blacklight Virtual Connect - May 2020

View Component

https://github.com/github/view_component
ViewComponents are Ruby objects that output HTML. Think of them as an evolution of the presenter pattern, inspired by React.

The problem

What does this look like

Any time you could use a partial, you could consider making a view component

Docker

Get on board

https://docs.docker.com/install/

Thank you!

Julian Fahrer

https://learndocker.online/

A tutorial

https://github.com/jcoyne/dockerizing_rails

What is Docker?

"Docker is a tool designed to make it easier to create, deploy, and run applications by using containers. Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package.

The Concepts

  • Image
  • Container
  • Volume

"A Docker image is a file, comprised of multiple layers, used to execute code in a Docker container"

Images become containers at runtime when they run on Docker Engine

Containers are....

  • Standard
  • Lightweight
  • Isolated

"Volumes are the preferred mechanism for persisting data generated by and used by Docker containers"

Volumes can use storage drivers

Why should I use Docker?

What do I need to know for Blacklight?

1. Docker is a convenience -- you don't have to use it.

(we're just using it for development and testing)

2. How to invoke it

Start Rails + Solr

docker-compose up

OR just start solr

docker-compose up solr

3. Cleaning up

docker-compose down -v

This removes the containers and volumes

Fin.