Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup Guide for Trading UI #121

Open
wants to merge 51 commits into
base: master
Choose a base branch
from
Open

Setup Guide for Trading UI #121

wants to merge 51 commits into from

Conversation

not-a-dev0
Copy link

Open a new Terminal and login to Instance you installed your Peatio on

Clone the repo and setup the Trading UI
Make sure you checkout the same branch you used for Peatio

cd ~/code
git clone https://github.com/rubykube/peatio-trading-ui.git
cd peatio-trading-ui
git checkout 1-9-stable

sudo mkdir -p /opt/vendor/bundle
sudo chown -R deploy:deploy /opt/vendor

Before running bundle install, make sure you are using ruby -v2.5.0

ruby -v

If it does not return 2.5.0p0, then you need to use rvm to change the ruby version

/bin/bash --login
rvm use 2.5.0

Then bundle install

bundle install --path /opt/vendor/bundle
bin/init_config

Edit the /config/application.yml

sudo nano config/application.yml

PLATFORM_ROOT_URL: http://peatio.tech
FRONTEND_ROOT_URL: http://peatio.tech:4000

Install and run yarn:

sudo npm install -g yarn
sudo chown -R deploy /home/deploy/.config
bundle exec rake tmp:create yarn:install

Then bundle precompile assets.

bundle exec rake tmp:clear log:clear
bundle exec rake assets:precompile

Creating and Sourcing Secret_key_base

bundle exec rake secret
echo "export SECRET_KEY_BASE=YOUR-SECRET" >> ~/.bashrc
source ~/.bashrc

Setup the reverse proxy

sudo nano /etc/nginx/sites-available/default

server {
  server_name      peatio.tech;
  listen           80;
  proxy_set_header Host peatio.tech;

  location ^~ /(?:trading|trading-ui-assets)\/ {
    proxy_pass http://127.0.0.1:4000;
    proxy_set_header    X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header    X-Real-IP $remote_addr;
    proxy_set_header    Host $http_host;
    proxy_next_upstream http_502 http_504 error timeout invalid_header;
  }

  location / {
    proxy_pass http://127.0.0.1:3000;
    proxy_redirect      default;
    proxy_set_header    X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header    X-Real-IP $remote_addr;
    proxy_set_header    Host $http_host;
    proxy_next_upstream http_502 http_504 error timeout invalid_header;
  }
}

Verify that the syntax of the config file is valid

sudo nginx -t

Restart NGINX

sudo systemctl restart nginx

Start the server

bundle exec rails server -p 4000

dinesh-skyach and others added 30 commits May 22, 2018 16:32
* Fixed Candlestick data disappearing issue

* Fixed broken candlestick
* FIxed All texts have invalid colors (too white)

* Fixed my orders bid/ask colors
Fix button colors and hover colors (closes #42)
Fix color for errors when placing orders (closes #41)
Fix text is not visible in the inputs (fixes #40)
Fix currency color at order panel (fixes #53)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants