DAX (market.bitzlato.com) from bitzlato/openware for development purposes.
It allows you to use all necessary environment in docker-containers (postgresql, vault, redis, rabbitmq, gateway(nginx), rango), meanwhile main packages (peatio, baseapp, barong) running locally with prepared connection to repository and ready for development.
MacOS is supported. Linux is not tested.
You should have installed and configured environment:
- docker vs docker-compose
- direnv
- rbenv
- nvm, yarn
- goenv
- wget
- You must have github authorization by public key
Configure and start dependency services:
make
1st terminal session (peatio)
make start_peatio
2nd terminal session (barong)
make start_barong
3rd terminal session (baseapp)
make start_baseapp
4th terminal session (rango)
make start_rango
5th terminal session (liza)
make start_liza
Open page http://localhost:8080/ in browser.
1st terminal session (peatio)
make start_peatio_web
2nd terminal session (barong)
make start_barong_web
3rd terminal session (baseapp)
make start_baseapp
The fastest way to start developing the frontend. Requires only baseapp and working staging server as a backend. The following command will run webpack-dev-server with proxying of API requests to the staging server.
make start_baseapp_proxy [PROXY_HOST=ex-stage.bitzlato.bz]
open http://localhost:8080/signin/auth0.html
- 8080 - gateway (nginx). It is routing requests to other services according to routing table in ambassador-config/mapping-peatio.yaml
- Other ports you can find in ambassador-config/mapping-peatio.yaml
make services
see docker-compose-geth.yml
make start_geth
make stop_geth
make geth_console
Install gem pg for mac and linux - https://wikimatze.de/installing-postgresql-gem-under-ubuntu-and-mac/
Look into your $PATH
If you have a problem like:
./bin/init_vault
VAULT_TOKEN=
Error disabling secrets engine at secret/: Error making API request.
URL: DELETE http://vault:8200/v1/sys/mounts/secret
Code: 400. Errors:
* missing client token
make: *** [Makefile:56: init_vault] Ошибка 2
or another like this. Check your setup direnv. if this command:
env | grep VAULT
doesn't show you anything. Please setup your direnv: https://clck.ru/XR3pC
See: se3000/ruby-eth#47
checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
--with-pg-config=/path/to/pg_config
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** extconf.rb failed ***
You need to install libpq
MacOs
brew install libpq
Linux
sudo apt-get install libpq-dev
Why it is running on localhost:8080 not www.app.local?
app.local is on http by default, but auth0 accepts localhost or https
cd barong
bundle exec rails c
User.find_each { |u| u.update_columns level: 3 }
cd peatio
bundle exec rails c
Member.find_each do |member|
member.get_account('usd').update_columns balance: 10000, locked: 1000
member.get_account('btc').update_columns balance: 1, locked: 1
end
Add to the .envrc.local
:
export VAULT_ENABLED=true
Base environment variables are provided by .envrc file from git repository, local overrides could be stored inside .envrc.local file that is excluded from version control
- On linux add
host.docker.internal
to hosts in docker-compose.yml. Or wait until developers will include it to docker setup. https://stackoverflow.com/questions/48546124/what-is-linux-equivalent-of-host-docker-internal - add availability to make withdraw/deposits
- add testnet node