-
Notifications
You must be signed in to change notification settings - Fork 133
66 lines (59 loc) · 1.56 KB
/
indexer-reusable-build-and-run-with-pg-redis-kafka.yml
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
name: Indexer reusable build and run with Postgres, Redis, Kafka
on:
workflow_call:
inputs:
COMMAND:
required: true
type: string
jobs:
run_command:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./indexer
services:
postgres:
image: postgres:12-alpine
env:
POSTGRES_PASSWORD: dydxserver123
POSTGRES_USER: dydx_test
ports:
- 5432:5432
redis:
image: redis:5.0.6-alpine
ports:
- 6379:6379
kafka:
image: blacktop/kafka:2.6
env:
KAFKA_ADVERTISED_HOST_NAME: localhost
KAFKA_CREATE_TOPICS:
"to-ender:1:1,\
to-vulcan:1:1,\
to-websockets-orderbooks:1:1,\
to-websockets-subaccounts:1:1,\
to-websockets-trades:1:1,\
to-websockets-markets:1:1,\
to-websockets-candles:1:1"
ports:
- 9092:9092
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install pnpm
run:
npm install -g [email protected]
- name: Build and install
run: |
pnpm install --loglevel warn --frozen-lockfile
pnpm run build:all
- name: Run command
run: ${{ inputs.COMMAND }}
env:
DB_PORT: 5432
REDIS_URL: redis://localhost:6379
RATE_LIMIT_REDIS_URL: redis://localhost:6379