- macOS or Linux
- Ruby version that matches the
.ruby-version
file. (rbenv is recommended for managing Ruby versions) - Node 18 (nvm is likewise recommended)
- Postgres (this template is confirmed to work with Postgres 18, but any reasonably recent version should work)
- Heroku CLI (optional, if you want to deploy on Heroku)
- Create a Postgres user by running
createuser [username] -d
. - Launch
psql
and create a database for your project, and set it to be owned by the user you created in step 1. - Create an
.env
file in the root folder of this project, following the format of.env.example
. - For the
SECRET_KEY_BASE
env parameter, you can generate a secure value by runningbundle exec rails secret
. - Run
bundle install
to install the gems from the Gemfile. - Run
npm run build
, which installs Node dependencies and builds the browser app. - Create an app on Heroku.
- Now you should be able to deploy to Heroku as covered in their docs.
Use bundle exec rake start
to start a live development build.
To run via Docker requires a IIIF Cloud instance as well. This can be run as a separate Docker application, or pointed to a IIIF Cloud application hosted somewhere else. All that's required is the IIIF_CLOUD_*
environment variables are set properly and a MapTiler account/API key.
To run via a Docker container (for development or production) set your environment variables in .env
, you can use .env.example
as a template. If an image has not yet been built, run docker compose up --build
to build the image and start the container. Subsequent starts of the container can be done with docker compose up
if no code changes have been made.