Giter VIP home page Giter VIP logo

publishers's Introduction

App for publishers.brave.com.

Build Status

Quick start

Setup

  1. Ruby 2.3.3. For a Ruby version manager try rbenv.
  2. Postgresql 9.5+: brew install postgresql (start with brew services start postgresql)
  3. Redis: brew install redis
  4. Install ruby gems foreman and mailcatcher: gem install bundler foreman mailcatcher
  5. Install project dependencies: bundle install --jobs=$(nproc)
  • Possible error: Nokogiri, with libxml2. Try installing a system libxml2 with brew install libxml2 and then bundle config build.nokogiri --use-system-libraries then again bundle install.
  1. Create and initialize the database
  • rails db:create RAILS_ENV=development
  • rails db:migrate RAILS_ENV=development

Run

  1. Start Postgres and redis.

  2. Run Rails server and async worker foreman start

  3. Visit http://localhost:3000

  4. To test email, run a local mail server at localhost:25 mailcatcher

Development

Config

Configuration is set in config/secrets.yml via environment variables.

It might be useful to maintain a local bash script with a list of env vars. For an example see config/secrets.yml.

Automagic addon vars

Some variables are set automagically with Heroku addons:

  • FIXIE_URL - Proxy provider. For outbound API requests.
  • MAILGUN_* - For sending emails.
  • NEW_RELIC_APP_NAME, NEW_RELIC_LICENSE_KEY - New Relic app monitoring.
  • REDIS_URL - For Sidekiq and rack-attack

Other vars

A few variables are not configured in secrets.yml:

  • GPG_PUBKEY - GPG pubkey for encrypting legal forms before uploading to S3.

Security check

  • Check for gem vulnerabilities: bundle exec bundle-audit check --update

publishers's People

Contributors

ayumi avatar bsclifton avatar jkup avatar mrose17 avatar bradleyrichter avatar

Watchers

Alan Gutierrez avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.