-
Notifications
You must be signed in to change notification settings - Fork 128
/
Makefile
83 lines (65 loc) · 2.27 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
.PHONY: build prepare run test stress seed down setup-apps config
COMPOSE = docker-compose
default: run
pull:
$(COMPOSE) pull vault \
db \
phpmyadmin \
redis \
rabbitmq \
mailcatcher \
ranger \
coinhub \
geth
config:
@echo "Rendering configuration..."
@bundle exec rake config:render
build: config pull
$(COMPOSE) build peatio \
barong \
trading_ui \
integration
geth:
@$(COMPOSE) up -d geth
bitcoin:
@echo "Updating peatio configuration..."
@cp config/peatio-seed-btc/*.yml config/peatio/seed/
@echo "Starting bitcoind container..."
@$(COMPOSE) up -d bitcoind
cryptonodes: geth
daemons:
$(COMPOSE) up --build -d withdraw_audit \
blockchain \
global_state \
deposit_collection \
deposit_collection_fees \
deposit_coin_address \
slave_book market_ticker \
pusher_market \
pusher_member \
matching \
order_processor \
trade_executor \
withdraw_coin \
k
dependencies:
$(COMPOSE) up -d vault db phpmyadmin redis rabbitmq mailcatcher ranger coinhub
$(COMPOSE) run --rm vault secrets enable totp || true
proxy:
@touch config/acme.json && chmod 0600 config/acme.json
prepare: proxy dependencies daemons cryptonodes
setup-apps: build
$(COMPOSE) run --rm peatio bash -c "./bin/link_config && bundle exec rake db:create db:migrate db:seed"
$(COMPOSE) run --rm barong bash -c "./bin/link_config && ./bin/setup"
run: prepare setup-apps
$(COMPOSE) up --build -d peatio barong trading_ui proxy
test:
@$(COMPOSE) run --rm integration
stress:
@bundle exec rake toolbox:run
start: config prepare setup-apps
$(COMPOSE) up -d peatio barong trading_ui proxy
update:
git submodule update --init --remote
down:
@$(COMPOSE) down