- Ruby: we recommend using
rvm to manage the Ruby versions. Install the requried ruby version with rvm.
rvm install 2.6.5
- Yarn 1.x: please refer to their installation guide.
- PostgreSQL 11 or higher.
- Local setup +
- Redis 4 or higher.
- Elasticsearch 7 or higher.
- Clone repository
git clone https://github.com/tarunvelli/ordbot.git
- Change into into repo directory
cd ordbot
- Install gems
bundle install
- Install node_modules
yarn install
-
Add .env file (can copy .env_sample) and add required values
- To generate keys for ACCOUNT_SID_ENCRYPTION_KEY and AUTH_TOEKN_ENCRYPTION_KEY run the following in rails console and copy to .env
`rake secret\`[0..31]
- To generate keys for CIPHER_KEY run the following in rails console and copy to .env
len = ActiveSupport::MessageEncryptor.key_len salt = SecureRandom.random_bytes(len) key = ActiveSupport::KeyGenerator.new('<some_password>').generate_key(salt, len) Base64.encode64(key)
-
Run the server
rails server
- The app will be available at http://localhost:3000