From 368c3ffd77ddd68285840325daf84fec8805ddf0 Mon Sep 17 00:00:00 2001 From: Julian Steinwachs Date: Mon, 29 Feb 2016 21:41:15 +0100 Subject: [PATCH] setup instructions --- README.md | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 57 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 03e81d7..d1b74c3 100755 --- a/README.md +++ b/README.md @@ -10,21 +10,76 @@ The main purpose of this project is to test the underlying Twister library [twis * Trending Hashtags * Direct Messages -## Setup as hosted by a publix twister proxy +## Setup as hosted by a public twister proxy +First we install basic dependecies + +``` apt-get update apt-get install -y git curl nodejs nodejs-legacy npm curl -sSL https://get.docker.com/ | sh +``` + +Now we pull twister-core + +``` git clone https://github.com/miguelfreitas/twister-core.git mkdir ~/.twister echo -e "rpcuser=user\nrpcpassword=pwd\nhtmldir=~/twister-react" > ~/.twister/twister.conf chmod 600 ~/.twister/twister.conf +``` +Next are this repo and twister-proxy + +``` git clone https://github.com/Tschaul/twister-react.git git clone https://github.com/digital-dreamer/twister-proxy.git -npm install -g browserify react-tools forever +npm install -g forever +``` + +We setup twister-proxy and pull the settings from this repo + +``` +cd twister-proxy +npm install +curl https://raw.githubusercontent.com/Tschaul/twister-react/master/docker/settings.json > settings.json +cd .. +``` + +Next we need the start script from this repo and set the correct rights. + +``` +curl https://raw.githubusercontent.com/Tschaul/twister-react/master/docker/run.sh > run.sh +chmod 777 run.sh +``` + +For https to work we need certificates. + +``` +git clone https://github.com/letsencrypt/letsencrypt + +./letsencrypt/letsencrypt-auto certonly --standalone +``` + +letsencrypt will ask you to provide an email address and your domain. It will then save your certificates in /etc/letsencrypt/live/example.com/ where example.com is your domain. + +As last step we have to tell twister-proxy where the certificates are + +``` +nano twister-proxy/settings.json +``` + +Inside "Server" replace example.com by your domain in a the "ssl_*" properties. Press Crtl+O to save and then Crtl+X to exit. + +Now we can start it up. When starting for the first time it will pull the twister docker-image. + +``` +./run.sh +``` + +twisterd now needs a while (10min to 1h depending on your connection) to download the blockchain. You can check `top` to see if twisterd is still busy. ## Screenshots