Last active
August 27, 2019 02:49
-
-
Save afifnandya/c5fb75e13bd3fcacfb6fc1db23df722e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# for ubuntu | |
1) install imagemagick v6 (already installed on ubuntu 18.04) | |
2) install rvm (follow https://rvm.io/rvm/install) | |
3) install redis (follow: https://tecadmin.net/install-redis-ubuntu/) | |
4) install memcached (follow: https://tecadmin.net/install-memcached-with-php-on-ubuntu/) | |
5) downlaod sql from https://drive.google.com/file/d/1wyQTu1X-XHxmDgIoIGcrGM_tVeHF_CqX/view) | |
6) install openssl (sudo apt-get install libcurl4-openssl-dev) if error installing curb gem | |
7) install libsasl2-dev (sudo apt-get install libsasl2-dev) if eror installaing memcached gem | |
8) install libmysqlclient-dev (sudo apt-get install libmysqlclient-dev) if error installing mysql2 | |
9) install libmagickcore-dev libmagickwand-dev (sudo apt-get install libmagickcore-dev libmagickwand-dev) if error installing rmagick 4.0.0 | |
10) install webp-ffi dependency (sudo apt-get install libjpeg-dev libpng-dev libtiff-dev libwebp-dev) | |
## Setup Project | |
```text | |
$ cd ~/hh-server | |
$ rvm --default use ruby-2.3.8 | |
$ bundle install | |
$ rake db:create | |
$ rake db:migrate | |
``` | |
Run Rails Server with warn level logs | |
```text | |
$ cd ~/hh-server | |
$ LOG_LEVEL=warn rails s webrick | |
``` | |
Run webpack server | |
```text | |
$ cd ~/hh-server | |
$ ./bin/webpack-dev-server | |
``` | |
Run sidekiq | |
```text | |
$ cd ~/hh-server | |
$ bundle exec sidekiq | |
``` | |
Run memcached | |
```text | |
$ memcached -l localhost | |
``` | |
Run redis | |
```text | |
$ redis-server | |
``` | |
Import database.sql dump file | |
```text | |
$ mysql -u root -p -h localhost < dbfile.sql | |
``` | |
## Setting up Environment and App Config | |
create `~/.credentials/google_credentials.json` | |
create `.env` to populate ENV | |
create `config/application.yml` | |
create `config/database.yml` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment