Go to file
unknown 45e9cef1ae new homepage and documentation pages 2019-03-13 12:55:35 -04:00
api new homepage and documentation pages 2019-03-13 12:55:35 -04:00
assets new homepage and documentation pages 2019-03-13 12:55:35 -04:00
config new homepage and documentation pages 2019-03-13 12:55:35 -04:00
docs new homepage and documentation pages 2019-03-13 12:55:35 -04:00
migrations add signing secret implementation 2019-03-05 18:55:31 -05:00
tasks fix things I fixed before and that were overwritten 2018-11-19 19:22:41 -05:00
test add test folders 2018-10-29 20:03:47 -04:00
views new homepage and documentation pages 2019-03-13 12:55:35 -04:00
.babelrc add babel polyfill 2018-10-29 19:23:37 -04:00
.editorconfig init sails app 2018-10-15 21:45:37 -04:00
.eslintignore Revert "merge #18, #19, #20, #23, #25" 2018-11-12 17:12:16 -05:00
.eslintrc Revert "merge #18, #19, #20, #23, #25" 2018-11-12 17:12:16 -05:00
.gitignore remove knexfile 2018-11-19 15:05:59 -05:00
.sailsrc test 2018-11-01 20:21:36 -04:00
.travis.yml Revert "merge #18, #19, #20, #23, #25" 2018-11-12 17:12:16 -05:00
CONTRIBUTING.md Create CONTRIBUTING.md 2018-10-15 22:41:12 -04:00
Gruntfile.js fix things I fixed before and that were overwritten 2018-11-19 19:22:41 -05:00
README.md new homepage and documentation pages 2019-03-13 12:55:35 -04:00
app.js fix things I fixed before and that were overwritten 2018-11-19 19:22:41 -05:00
package.json new homepage and documentation pages 2019-03-13 12:55:35 -04:00
shrinkwrap.yaml new homepage and documentation pages 2019-03-13 12:55:35 -04:00
webpack.config.js add admin pages for whitelist management 2019-02-24 16:27:24 -05:00

README.md

River of Ebooks

https://github.com/EbookFoundation/RoE-pipe

About

The River of Ebooks serves as an easy-to-use ebook aggregator. Publishers can send metadata from new and updated ebooks through the River where it will be available for any downstream consumers to read, allowing for a more widely available ebook collection. This way, ebooks can be made available on all end user sites, instead of only the site they were published with.


Version info

This app was originally generated on Tue Oct 16 2018 01:21:31 GMT+0000 (UTC) using Sails v1.0.2.

Setup

a Sails v1 application Build Status

Standalone

  1. Standard npm install
git clone https://github.com/EbookFoundation/RoE-pipe
cd RoE-pipe
npm i
  1. Create config files
touch knexfile.js ecosystem.config.js config/local.js
  1. Add database info to knexfile and pm2 ecosystem
/* -- knexfile.js -- */
module.exports = {
  client: 'pg',
  connection: 'postgresql://user:password@example.com:5432/databasename'
}

/* -- ecosystem.config.js -- */

// Options reference: https://pm2.io/doc/en/runtime/reference/ecosystem-file/
module.exports = {
  apps: [{
    name: 'roe-base',
    script: 'app.js',
    instances: 1,
    autorestart: true,
    watch: false,
    env: {
      NODE_ENV: 'development'
    },
    env_production: {
      NODE_ENV: 'production',
      SAILS_DATASTORE_URL: 'postgresql://user:password@example.com:5432/databasename'
    }
  }]
}
  1. Add secrets to config/local.js
/* -- config/local.js -- */
module.exports = {
  skipperConfig: {
    adapter: require('skipper-s3'),
    key: 'S3_API_KEY',
    secret: 'S3_API_SECRET',
    bucket: 'S3_BUCKET'
  },
  passport: {
    google: {
      options: {
        clientID: 'GOOGLE_CLIENT_ID',
        clientSecret: 'GOOGLE_CLIENT_SECRET'
      }
    },
    github: {
      options: {
        clientID: 'GITHUB_CLIENT_ID',
        clientSecret: 'GITHUB_CLIENT_SECRET'
      }
    }
  }
}
  1. Run database migrations
npm run db:migrate
  1. Start server
npm start

Elastic Beanstalk

  1. Clone repo
git clone https://github.com/EbookFoundation/RoE-pipe
cd RoE-pipe
  1. Deploy to environment
eb deploy environment_name
  1. Configure environment variables on elastic beanstalk