Skip to content

Instantly share code, notes, and snippets.

@ghousemohamed
Last active November 8, 2022 05:08
Show Gist options
  • Save ghousemohamed/6621b6196547b1505508772693d69fca to your computer and use it in GitHub Desktop.
Save ghousemohamed/6621b6196547b1505508772693d69fca to your computer and use it in GitHub Desktop.
How to Deploy Rails Application using neetoReview

1. Create a file named Procfile in the root directory with the following content:

web:  bundle exec puma -C config/puma.rb
worker: bundle exec sidekiq -C config/sidekiq.yml
release: bundle exec rake db:migrate setup_sample_data

Please make sure you have a rake task available in the project called setup_sample_data. This rake task does not necessarily need to have any associated code in it. It can be a blank rake task, or you can choose to populate it with your own custom logic your app might require.

2. Create a file named app.json in the root directory with the following content:

{
  "name": "Your app name",
  "scripts": {},
  "stack": "heroku-20",
  "env": {
    "RESET_DATABASE_WITH_SAMPLE_DATA": {
      "required": true,
      "value": "true"
    },
    "SECRET_KEY_BASE": {
      "required": false,
      "value": "0e649990875d727097d4df6a82ccc6cff7a2d8b49e1eb6697a2a36134d58969d74328edc018747e28a4bf73c077687c15783dfed7d45e76ed60ce83b0ce97b27"
    },
    "RACK_ENV": {
      "value": "heroku"
    },
    "PORT": {
      "value": 3000
    },
    "RAILS_ENV": {
      "value": "heroku"
    },
    "HEROKU_APP_NAME": {
      "required": true
    },
    "LOG_LEVEL": {
      "value": "DEBUG"
    },
    "YARN_PRODUCTION": {
      "value": "true"
    },
    "NODE_MODULES_CACHE": {
      "value": "true"
    },
    "YARN_CACHE": {
      "value": "true"
    },
    "DISABLE_RACK_ATTACK": {
      "value": "true"
    },
    "DEFAULT_PASSWORD": {
      "value": "welcome"
    },
    "DEFAULT_SUBDOMAIN": {
      "value": "app"
    },
    "CLIENT_AUTHENTICATION_TOKEN": {
      "value": "mysecrettoken123%&^@"
    },
    "ENCRYPTION_PRIMARY_KEY":{
      "value": "APqKn1qJmwNXgDcHnXTOaFIhtYhnP3LN"
    },
    "ENCRYPTION_DETERMINISTIC_KEY":{
      "value": "0VVpOKlunO4QtsHhieXJfdXZ6GXeIam9"
    },
    "ENCRYPTION_DERIVATION_SALT_KEY":{
      "value": "BjUcTV17hJNy7bzN19q467nnF3ZtW0kJ"
    }
  },
  "formation": {},
  "addons": [
    {
      "plan": "heroku-postgresql",
      "options": {
        "version": "14"
      }
    },
    {
      "plan": "heroku-redis:hobby-dev",
      "options": {
        "version": "6"
      }
    }
  ],
  "buildpacks": [
    {
      "url": "heroku/nodejs"
    },
    {
      "url": "heroku/ruby"
    }
  ]
}

3. Create an account in neetoreview.net

  1. To create an account in neetoreview.net, visit https://app.neetoauth.net/signups/new, and sign up using your BigBinary email address.
  2. After signing up, you should see this screen:

Screenshot 2022-11-08 at 9 46 37 AM

4. Follow the steps mentioned in this video:

https://www.loom.com/share/c77d39345fcb45bbb8b03aa78c01c12d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment