-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
76 lines (60 loc) · 1.97 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
include .env
export $(shell sed 's/=.*//' .env)
.PHONY: tests docker protoc
ARGS := $(wordlist 2, $(words $(MAKECMDGOALS)), $(MAKECMDGOALS))
# config path
WEB_CONFIG = ../config.toml
CURRENCY_CONFIG = ../config.toml
BOT_CONFIG = ./config.toml
LOGGER_ENV = ../.env
WEB_ENV = ../.env
BLOCKCHAIN_ENV=../.env
SECRETS = ../secrets
BOT_SECRETS = ./secrets
LOCALES = ./locales
%:
@:
run_all: run_logger run_web
# run_all: ts run_web
run_bot:
# CONFIG=$(BOT_CONFIG) SECRETS=$(BOT_SECRETS) LOCALES=$(LOCALES) tsx rackBot/index.ts
CONFIG=$(BOT_CONFIG) SECRETS=$(BOT_SECRETS) LOCALES=$(LOCALES) bun rackBot/index.ts
run_currency:
cd blockchain && ENVPATH=$(BLOCKCHAIN_ENV) go run .
run_logger:
# killall racklog || true
cd logger && ENVPATH=$(LOGGER_ENV) go run . &
run_web:
cd api && TZ=UTC+3 ENVPATH=$(WEB_ENV) go run .
build_images:
echo hi
# parseable:
# docker run -p 8000:8000 \
# -v /tmp/parseable/data:/parseable/data \
# -v /tmp/parseable/staging:/parseable/staging \
# -e P_FS_DIR=/parseable/data \
# -e P_SEND_ANONYMOUS_USAGE_DATA=false \
# -e P_STAGING_DIR=/parseable/staging \
# -e P_USERNAME=$(PARSEABLE_USERNAME) \
# -e P_PASSWORD=$(PARSEABLE_PASSWORD) \
# containers.parseable.com/parseable/parseable:latest \
# parseable local-store
# nats:
# # docker pull nats:latest
# docker run -p 4222:4222 -ti nats:latest
stress:
siege -c 100 -t 1M http://localhost:8888
tests_web:
cd api && go test -timeout 30s rackpay/rack/nats -v && go test -timeout 30s rackpay/rack/app/v1/helpers -v
tests:
cd tests && go test *.go -v
ts:
cd api/internal/frontend && npm run build
docker:
python3 scripts/docker.py $(ARGS)
# compose:
# bash scripts/compose.sh
protoc:
cd pkg/protos && protoc --go_out=gen/go --go_opt=paths=source_relative \
--go-grpc_out=gen/go --go-grpc_opt=paths=source_relative log.proto
default: run_all