Skip to content

Commit e76181a

Browse files
authored
Add pyth-evm-watcher to tilt (#238)
1 parent 1f785d5 commit e76181a

File tree

4 files changed

+52
-0
lines changed

4 files changed

+52
-0
lines changed

Tiltfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,19 @@ if pyth:
254254
labels = ["pyth"]
255255
)
256256

257+
# Pyth EVM Watcher
258+
docker_build(
259+
ref = "pyth-evm-watcher",
260+
context = "third_party/pyth/evm-watcher/",
261+
dockerfile = "third_party/pyth/evm-watcher/Dockerfile",
262+
)
263+
k8s_yaml_with_ns("devnet/pyth-evm-watcher.yaml")
264+
k8s_resource(
265+
"pyth-evm-watcher",
266+
resource_deps = ["eth-devnet"],
267+
labels = ["pyth"]
268+
)
269+
257270

258271
k8s_yaml_with_ns("devnet/eth-devnet.yaml")
259272

devnet/pyth-evm-watcher.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: pyth-evm-watcher
5+
spec:
6+
selector:
7+
matchLabels:
8+
app: pyth-evm-watcher
9+
replicas: 1
10+
template:
11+
metadata:
12+
labels:
13+
app: pyth-evm-watcher
14+
spec:
15+
terminationGracePeriodSeconds: 0
16+
containers:
17+
- name: pyth-evm-watcher
18+
image: pyth-evm-watcher
19+
resources:
20+
limits:
21+
memory: "128Mi"
22+
cpu: "500m"
23+
env:
24+
- name: WS_ENDPOINT
25+
value: 'ws://eth-devnet:8545'
26+
- name: PYTH_CONTRACT
27+
value: '0xDb56f2e9369E0D7bD191099125a3f6C370F8ed15'
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
WS_ENDPOINT="ws://localhost:8545"
2+
PYTH_CONTRACT="0xDb56f2e9369E0D7bD191099125a3f6C370F8ed15"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM node:16-alpine@sha256:72a490e7ed8aed68e16b8dc8f37b5bcc35c5b5c56ee3256effcdee63e2546f93
2+
3+
RUN addgroup -S pyth -g 10001 && adduser -S pyth -G pyth -u 10001
4+
USER pyth
5+
6+
WORKDIR /usr/src/evm-watcher
7+
COPY --chown=pyth:pyth . .
8+
RUN npm ci && npm run build && npm cache clean --force
9+
10+
CMD [ "npm", "run", "start" ]

0 commit comments

Comments
 (0)