Skip to main content

Ubuntu / Debian

Installation

1. Fork repository to your account

2. Clone the repo to local

$ git clone https://github.com/<your-name>/miru-web.git

3. Install rvm and nvm

(Tip: To allow nvm to automatically detect and change node versions for your project as you cd into the directory follow this)

4. Install Ruby

$ rvm install $(cat .ruby-version)

5. Install Node 18.14.2(can be skipped if you followed the tip mentioned in (3) above)

$ nvm install $(cat .nvmrc)

6. Install Postgres

$ sudo apt install postgresql-13

Verify postgres is up and running by:

$ sudo systemctl status postgresql.service

If not, to start it run:

$ sudo systemctl enable postgresql.service --now

Default superuser is postgres. Set password for the user by running:

$ sudo -u postgres psql -c "ALTER USER postgres PASSWORD '<new-password>';"

7. Install Elasticsearch

The Elasticsearch components are not available in Ubuntu’s default package repositories. They can, however, be installed with APT after adding Elastic’s package source list.

All of the packages are signed with the Elasticsearch signing key in order to protect your system from package spoofing. Packages which have been authenticated using the key will be considered trusted by your package manager. In this step, you will import the Elasticsearch public GPG key and add the Elastic package source list in order to install Elasticsearch.

To begin, use cURL, the command line tool for transferring data with URLs, to import the Elasticsearch public GPG key into APT. Note that we are using the arguments -fsSL to silence all progress and possible errors (except for a server failure) and to allow cURL to make a request on a new location if redirected. Pipe the output of the cURL command into the apt-key program, which adds the public GPG key to APT.

$ curl -fsSL https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -

Next, add the Elastic source list to the sources.list.d directory, where APT will search for new sources:

$ echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list

Next, update your package lists so APT will read the new Elastic source:

$ sudo apt update

Then install Elasticsearch with this command:

$ sudo apt install elasticsearch

Verify Elasticsearch is up and running by:

$ systemctl status elasticsearch.service

If not, to start it run:

$ sudo systemctl enable elasticsearch.service --now

8. Install Redis

$ sudo apt install redis redis-server

Verify redis and redis-server is up and running by:

$ systemctl status redis.service
$ systemctl status redis-server.service

If not, to start it, run:

$ sudo systemctl enable redis.service redis-server.service --now

9. Setup the app

Go to the miru-web app directory

cd miru-web

Add database username as postgres and your password to config/database.yml under default section.

Run the initial setup script

./bin/setup

10. Run app in local env

foreman start -f Procfile.dev

11. Navigate to http://0.0.0.0:3000 for accessing the app

To receive the emails in non-production apps.

Go to /sent_emails for accessing the emails(for /sent_emails route to work, add EMAIL_DELIVERY_METHOD='letter_opener_web' to .env)

Testing in Review apps

User Test credentials

RoleEmailPassword
Ownervipul@example.comwelcome
Adminsupriya@example.comwelcome
Employeesam@example.comwelcome
Clientoliver@example.comwelcome