Last active
March 25, 2017 10:34
-
-
Save jrgns/979a6d3ea7cc94db671551227fd6469a to your computer and use it in GitHub Desktop.
ProxES Setup
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
# Dependencies / Utilities | |
sudo apt-get update | |
sudo apt-get install -y screen curl git build-essential libssl-dev | |
# Install RVM for Ruby | |
if [ ! -f ~/.rvm/scripts/rvm ] | |
then | |
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 | |
\\curl -sSL https://get.rvm.io | bash | |
fi | |
source ~/.rvm/scripts/rvm | |
# Install Ruby | |
rvm use 2.4 --install | |
# Setup ProxES | |
mkdir proxes | |
cd proxes | |
echo "source 'https://rubygems.org'" > Gemfile | |
echo "gem 'proxes'" >> Gemfile | |
echo "gem 'sqlite3'" >> Gemfile | |
bundle install | |
curl https://raw.githubusercontent.com/EagerELK/proxes/master/config.ru -o config.ru | |
# Setup the DB | |
export DATABASE_URL=sqlite://development.db | |
echo "require 'proxes/rake_tasks'" > Rakefile | |
bundle exec rake proxes:migrate | |
bundle exec rake proxes:seed | |
# Setup the Elasicsearch URL | |
export ELASTICSEARCH_URL=http://127.0.0.1:9200 | |
# Setup the secret tokens | |
rake proxes:generate_tokens | |
# Run the server | |
bundle exec rackup | |
# Visit http://localhost:9292 to see the interface |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment