f3f46ae0ad
Only opds |
||
---|---|---|
api | ||
assets | ||
config | ||
docs | ||
migrations | ||
tasks | ||
test | ||
views | ||
.babelrc | ||
.editorconfig | ||
.eslintignore | ||
.eslintrc | ||
.gitignore | ||
.sailsrc | ||
.travis.yml | ||
CONTRIBUTING.md | ||
Gruntfile.js | ||
README.md | ||
app.js | ||
package.json | ||
shrinkwrap.yaml | ||
webpack.config.js |
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
Standalone
- Standard npm install
git clone https://github.com/EbookFoundation/RoE-pipe
cd RoE-pipe
npm i
- Create config files
touch knexfile.js ecosystem.config.js config/local.js
- 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'
}
}]
}
- 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'
}
}
}
}
- Run database migrations
npm run db:migrate
- Start server
npm start
Elastic Beanstalk
- Clone repo
git clone https://github.com/EbookFoundation/RoE-pipe
cd RoE-pipe
- Deploy to environment
eb deploy environment_name
- Configure environment variables on elastic beanstalk