Skip to content

Latest commit

 

History

History
57 lines (47 loc) · 1.58 KB

local-development.md

File metadata and controls

57 lines (47 loc) · 1.58 KB

Local Development and Running

To develop and running typhoon on your local machine you need to understand the basic about docker and have docker installed. To install docker you can follow the link here.

Clone The Repo

First clone typhoon into your local machine

git clone git@github.com:bukalapak/typhoon.git

Copy env.sample

Copy env.sample to .env

cp env.sample .env

Build Docker Image

First we need to create Docker image for our app and load-test container

docker-compose build app load-test

Create DB, Migrate and Seed

Run the command below to create db, migrate and seed the data

docker-compose run --rm app dockerize -wait tcp://mysql:3306 -timeout 20s bundle exec rails db:create db:migrate db:seed  

Run The Server

There are several ways to run the server from docker compose:

  • Normal Way. To exit the app simply use Ctrl+C
docker-compose up app
  • Detach or running in the background.
docker-compose up -d app

Use this command to stop the server

docker-compose down

Setup Grafana (Optional) (Under Maintenance)

Grafana is used to visualize realtime data that being generated by typhoon. To setup and run grafana follow the instruction below

  • Run grafana
docker-compose up -d grafana
  • Access grafana from http://localhost:3001
  • Login into grafana using credential below:
    • username: typhoon
    • password: typhoon

You can access the Dashboard for Stress Testing or Load Testing from dashboard manager.