https://github.com/performant-software/core-data-cloud
Core Data. In the Cloud.
https://github.com/performant-software/core-data-cloud
Last synced: 6 months ago
JSON representation
Core Data. In the Cloud.
- Host: GitHub
- URL: https://github.com/performant-software/core-data-cloud
- Owner: performant-software
- Created: 2023-08-10T17:45:09.000Z (almost 3 years ago)
- Default Branch: develop
- Last Pushed: 2025-12-19T18:31:58.000Z (7 months ago)
- Last Synced: 2025-12-22T06:38:55.019Z (7 months ago)
- Language: JavaScript
- Size: 2.13 MB
- Stars: 2
- Watchers: 5
- Forks: 1
- Open Issues: 177
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# core-data-cloud
## Requirements
- macOS or Linux
- Ruby version that matches the `.ruby-version` file. ([rbenv](https://github.com/rbenv/rbenv) is recommended for managing Ruby versions)
- Node 18 ([nvm](https://github.com/nvm-sh/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)
## Setup
1. Create a Postgres user by running `createuser [username] -d`.
2. Launch `psql` and create a database for your project, and set it to be owned by the user you created in step 1.
3. Create an `.env` file in the root folder of this project, following the format of `.env.example`.
4. For the `SECRET_KEY_BASE` env parameter, you can generate a secure value by running `bundle exec rails secret`.
5. Run `bundle install` to install the gems from the Gemfile.
6. Run `npm run build`, which installs Node dependencies and builds the browser app.
7. Create an app on Heroku.
8. Now you should be able to deploy to Heroku as covered [in their docs](https://devcenter.heroku.com/articles/git).
## Development
Use `bundle exec rake start` to start a live development build.
### Flow
To install Flow types run `yarn flow-typed install`. To run Flow server run `yarn flow`.
**Note:** Currently, Flow is throwing errors for most files. Instead of updating these all at once, we should fix the Flow errors as other changes are made to the files. Eventually, we should convert this code-base to Typescript.
## Docker
#### Prerequsites
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.
#### Running
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.
## Production
### Heroku Backups
Use the following command the schedule daily backups in a Heroku environment:
```
heroku pg:backups:schedule DATABASE_URL --at '00:00 America/New_York' --app my-app
```
See Heroku's [retention policy](https://devcenter.heroku.com/articles/heroku-postgres-backups#scheduled-backups-retention-limits) for backups.