浏览代码

[price-pusher] update docker files (#654)

* update docker files

* update package .json

* remove nc

* updated price pusher package name
Dev Kalra 2 年之前
父节点
当前提交
53c965481a

文件差异内容过多而无法显示
+ 392 - 521
package-lock.json


+ 15 - 7
price_pusher/Dockerfile

@@ -1,11 +1,19 @@
-FROM node:16-alpine@sha256:72a490e7ed8aed68e16b8dc8f37b5bcc35c5b5c56ee3256effcdee63e2546f93
+# Defined in tilt_devnet/docker_images/Dockerfile.lerna
+FROM lerna:latest
 
 
-RUN addgroup -S pyth -g 10001 && adduser -S pyth -G pyth -u 10001
-USER pyth
+USER root
 
 
-ARG PRICE_PUSHER_PATH=/usr/src/pyth-evm-price-pusher
-WORKDIR ${PRICE_PUSHER_PATH}
-COPY --chown=pyth:pyth . .
-RUN npm ci && npm run build && npm cache clean --force
+WORKDIR /home/node/
+USER 1000
+
+# local dependencies
+COPY --chown=1000:1000 price_service/client/js price_service/client/js
+COPY --chown=1000:1000 price_service/sdk/js price_service/sdk/js
+
+COPY --chown=1000:1000 price_pusher price_pusher
+
+RUN npx lerna run build --scope="@pythnetwork/pyth-price-pusher" --include-dependencies
+
+WORKDIR /home/node/price_pusher
 
 
 ENTRYPOINT [ "npm", "run", "start" ]
 ENTRYPOINT [ "npm", "run", "start" ]

+ 1 - 0
price_pusher/docker-compose.mainnet.sample.yaml

@@ -58,6 +58,7 @@ services:
     restart: always
     restart: always
     command:
     command:
       - "--"
       - "--"
+      - "evm"
       - "--endpoint"
       - "--endpoint"
       # Replace this with RPC endpoint URL for the EVM network.
       # Replace this with RPC endpoint URL for the EVM network.
       - "https://bsc-dataseed2.binance.org"
       - "https://bsc-dataseed2.binance.org"

+ 1 - 1
price_pusher/docker-compose.testnet.sample.yaml

@@ -70,4 +70,4 @@ services:
         condition: service_healthy
         condition: service_healthy
 configs:
 configs:
   command_config:
   command_config:
-    file: ./config.injective.sample.json # Replace this with the path to the configuration file
+    file: ./config.injective.testnet.sample.json # Replace this with the path to the configuration file

+ 6 - 5
price_pusher/package.json

@@ -1,7 +1,7 @@
 {
 {
-  "name": "@pythnetwork/pyth-evm-price-pusher",
-  "version": "2.0.2",
-  "description": "Pyth EVM Price Pusher",
+  "name": "@pythnetwork/pyth-price-pusher",
+  "version": "3.0.0",
+  "description": "Pyth Price Pusher",
   "homepage": "https://pyth.network",
   "homepage": "https://pyth.network",
   "main": "lib/index.js",
   "main": "lib/index.js",
   "types": "lib/index.d.ts",
   "types": "lib/index.d.ts",
@@ -9,7 +9,7 @@
     "lib/**/*"
     "lib/**/*"
   ],
   ],
   "bin": {
   "bin": {
-    "pyth-evm-price-pusher": "./lib/index.js"
+    "pyth-price-pusher": "./lib/index.js"
   },
   },
   "repository": {
   "repository": {
     "type": "git",
     "type": "git",
@@ -31,7 +31,8 @@
     "pyth",
     "pyth",
     "oracle",
     "oracle",
     "evm",
     "evm",
-    "ethereum"
+    "ethereum",
+    "injective"
   ],
   ],
   "license": "Apache-2.0",
   "license": "Apache-2.0",
   "devDependencies": {
   "devDependencies": {

部分文件因为文件数量过多而无法显示