postgresql
sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main" >> /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \sudo apt-key add -
apt-get update
sudo apt-get -y install postgresql-10
sudo apt-get install libpq-dev
createuser CURRENT_USER -U postgres -s
redis
sudo apt update
sudo apt install redis-server
elastic
curl -L -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.15.deb
sudo dpkg -i elasticsearch-5.6.15.deb
sudo /usr/share/elasticsearch/bin/elasticsearch-plugin install http://dl.bintray.com/content/imotov/elasticsearch-plugins/org/elasticsearch/elasticsearch-analysis-morphology/5.6.15/elasticsearch-analysis-morphology-5.6.15.zip
sudo /etc/init.d/elasticsearch start
rbenv
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
cd ~/.rbenv && src/configure && make -C src
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build
ruby
sudo apt-get install -y libssl-dev libreadline-dev
rbenv install 2.6.3
node
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.0/install.sh | bash
nvm install v10.16.3
yarn
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarn
hosts
sudo vim /etc/hosts
127.0.0.1 app.kiiiosk.dev
127.0.0.1 api.kiiiosk.dev
127.0.0.1 admin.kiiiosk.dev
127.0.0.1 365detox.kiiiosk.dev
merchantly
git clone https://github.com/BrandyMint/merchantly
git submodule init
git submodule update
bundle install
yarn
cp config/database.yml.example config/database.yml
cp config/secrets.yml.example config/secrets.yml
cp config/chewy.yml.example config/chewy.yml
bundle exec rails db:create db:seed db:update_openbill_triggers
bundle exec cap production db:pull
rails runner 'GoodsIndex.create!'
rails runner 'GoodsIndex.reset! Time.now.to_i'
rails s