Giter Site home page Giter Site logo

housereno-backend's Introduction

  ___  __  ____  ____  ____  __    ____   __   ____  ____     __   ____  __  
 / __)/  \(    \(  __)(  __)(  )  (  _ \ / _\ / ___)(  __)   / _\ (  _ \(  )
( (__(  O )) D ( ) _)  ) _)  )(    ) _ (/    \\___ \ ) _)   /    \ ) __/ )(  
 \___)\__/(____/(____)(__)  (__)  (____/\_/\_/(____/(____)  \_/\_/(__)  (__)


Table of Contents

  1. Requirements
  2. Setup
    1. New Project
    2. Existing Project
  3. Environment Variables
  4. General Information
  5. Change Log


Version Requirements

  • Ruby 3.0.2

  • Rails 6.1.4


Setup

New Projects

  1. Use template to create a new repo

  2. Open in your IDE

  3. run EDITOR="code --wait" bin/rails credentials:edit

    • This will create a new master.key and new credentials.yml.enc
  4. Put in all environment variables below

    • all are needed, use place holders for time being and edit as you go
  5. Edit this ReadME for your new project! to get rid of all this un needed information, you can keep the Existing project section if you like

Existing Project

  1. master.key already exist

    • Obtain master.key from Heroku
      • Or from your team lead if you do not have access
  2. Paste the master.key from your team lead/heroku and save

  3. run EDITOR="code --wait" bin/rails credentials:edit

    • If it opens you are good to go
    • If not, your master.key is wrong
      • Check with your team lead
      • Do not attempt to generate a new master.key

Environment Variables

invitation:
    url: 'https://urlhere'

twilio:
    default_number: '555-555-5555'
    account_sid: 'sid_here'
    auth_token: 'auth_token'

sendgrid:
    default_email: '[email protected]'
    domain: 'domain.com'
    address: 'smtp.sendgrid.net'
    username: 'apikey' #apikey actually is the username to authenticate with api secret token below
    password: 'api_token'

sidekiq:
    auth_username: 'username'
    auth_password: 'password'

workers:
    max_threads: #
    min_threads: #

Access Rails Environment Variables

EDITOR="code --wait" bin/rails credentials:edit

If this is a new project use the above command. Copy the above Environment Variables and set appropriately. Make sure the master key generated in master.key is copied over to the project on Heroku, if not Heroku can not decrypt the environment variables. If this is not a new project, before running the above command make sure you have the master key copied from Heroku, and/or speak with your Team Lead to set the project up correctly.


Test Suite

You can run the test suite by calling rails test. This project uses MiniTest.

Background Processing

This project comes with Sidekiq and Sidekiq scheduler built-in as gems. Sidekiq leverages Redis, and Redis is provided as a gem. When running the application, you'll need to run Sidekiq alongside the normal Rails server in order for the background processing to work locally.

You may want to look into utilizing something like Foreman to turn on and off all of your services at once. Otherwise, you can start Sidekiq in a new terminal by running bundle exec sidekiq.


Coming Soon

Rails 7 stable is almost ready for release in the upcoming months this template will be upgraded to Rails 7. Documentation will be provided with changes/features made on the transition.

Changes

11/23 - Whitelisted local host and .ngrok -Lee


housereno-backend's People

Contributors

jcalhoun95 avatar

Watchers

 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.