Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Install Docker. Docker has step-by-step instructions to grab its most up-to-date version. Depending on your package manager, you could also install a slightly older version with: sudo apt-get install docker-ce or sudo yum install docker-ce.
  2. Create any dependent, temporary containers (optional) for integrations like Elasticsearch and Postgres. We don't recommend using containers in the long-term for holding or maintaining data. However, if you just want to get a sense of how your Circulation Manager will work, containers are a quick option. Instructions for integrating Elasticsearch and Postgres via Docker can be found below.
  3. Get the Docker images for the Library Simplified Circulation Manager. Run:
   $ sudo docker pull nypl/circ-

...

webapp && sudo docker pull nypl/circ-scripts

Running Circulation Manager containers

...

Anchor
_55slrod1jusc
_55slrod1jusc
Example docker run script

$    $ sudo docker run -d --name circ-scripts \ -e TZ="US/Central" \ -e SIMPLIFIED_DB_TASK='init' \ -e SIMPLIFIED_PRODUCTION_DATABASE='postgres://[username]:[password]@[host]:[port]/[database_name]' \ nypl/circ-scripts

...

Once you've given your scripts some time to run (~30 minutes should be enough time to start having works move through the import process), you'll want to refresh your cached materialized views so they show up in your deployed app.```sh$

   $ sudo docker exec circ-scripts /var/www/circulation/core/bin/run refresh_materialized_

...

views

Anchor
_b9bwrvuw3ilv
_b9bwrvuw3ilv
Troubleshooting

...

Anchor
_3xw8zwfy5mpu
_3xw8zwfy5mpu
Example docker run script

   $ sudo docker run --name circ-

...

webapp \ -d -p 80:80 \ -e SIMPLIFIED_PRODUCTION_DATABASE='postgres://[username]:[password]@[host]:[port]/[database_name]' \ -e SIMPLIFIED_DB_TASK="

...

auto" \ nypl/circ-

...

webapp

Anchor
_5gvpvxf6ewi0
_5gvpvxf6ewi0
What It Does

...

  1. Add the Postgres URL to database environment variable as shown above. It will be of the form "postgres://simplified:test@172.17.0.3:5432/simplified_circ_db", following the "postgres://<USERNAME>:<PASSWORD>@<HOST>:<PORT>/<DATABASE_NAME>" format.

...