Skip to content

Commit e2d8a2c

Browse files
authored
fix build and upgrade subql (#1040)
* fix build * fix * fix build * magic * use latest subql * use latest subql ndoe * fix * update
1 parent 6398220 commit e2d8a2c

File tree

8 files changed

+678
-5185
lines changed

8 files changed

+678
-5185
lines changed

.github/workflows/docker.yml

+4-6
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: checkout
14-
uses: actions/checkout@v3
15-
with:
16-
submodules: 'recursive'
14+
uses: actions/checkout@v4
15+
1716
- name: Set up Docker Buildx
1817
uses: docker/setup-buildx-action@v2
1918

@@ -47,9 +46,8 @@ jobs:
4746
runs-on: ubuntu-latest
4847
steps:
4948
- name: checkout
50-
uses: actions/checkout@v3
51-
with:
52-
submodules: 'recursive'
49+
uses: actions/checkout@v4
50+
5351
- name: Set up Docker Buildx
5452
uses: docker/setup-buildx-action@v2
5553

.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v18.18.2

packages/eth-rpc-adapter/Dockerfile

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:16-alpine as builder
1+
FROM node:18-alpine as builder
22
LABEL maintainer="[email protected]"
33

44
WORKDIR /app
@@ -18,11 +18,14 @@ RUN yarn build
1818

1919
# =============
2020

21-
FROM node:16-alpine
21+
FROM node:18-alpine
2222
LABEL maintainer="[email protected]"
2323

2424
COPY --from=builder /app/package.json /app/.yarnrc.yml /app/
2525
COPY --from=builder /app/node_modules /app/node_modules
26+
COPY --from=builder /app/packages/eth-rpc-adapter/node_modules /app/packages/eth-rpc-adapter/node_modules
27+
# COPY --from=builder /app/packages/eth-transactions/node_modules /app/packages/eth-transactions/node_modules # don't exist
28+
# COPY --from=builder /app/packages/eth-providers/node_modules /app/packages/eth-providers/node_modules # don't exist
2629

2730
COPY --from=builder /app/packages/eth-rpc-adapter/package.json /app/packages/eth-rpc-adapter/package.json
2831
COPY --from=builder /app/packages/eth-transactions/package.json /app/packages/eth-transactions/package.json
@@ -32,10 +35,6 @@ COPY --from=builder /app/packages/eth-rpc-adapter/lib /app/packages/eth-rpc-adap
3235
COPY --from=builder /app/packages/eth-transactions/lib /app/packages/eth-transactions/lib
3336
COPY --from=builder /app/packages/eth-providers/lib /app/packages/eth-providers/lib
3437

35-
COPY --from=builder /app/packages/eth-rpc-adapter/node_modules /app/packages/eth-rpc-adapter/node_modules
36-
COPY --from=builder /app/packages/eth-transactions/node_modules /app/packages/eth-transactions/node_modules
37-
# COPY --from=builder /app/packages/eth-providers/node_modules /app/packages/eth-providers/node_modules # don't exist
38-
3938
WORKDIR /app/packages/eth-rpc-adapter
4039

4140
EXPOSE 8545

packages/eth-rpc-adapter/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
},
3636
"devDependencies": {
3737
"@acala-network/contracts": "4.3.4",
38+
"@typechain/ethers-v5": "^11.1.2",
3839
"@types/body-parser": "~1.19.1",
3940
"@types/connect": "~3.4.35",
4041
"@types/cors": "~2.8.12",

packages/evm-subql/Dockerfile

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:16-alpine as builder
1+
FROM node:18-alpine as builder
22
LABEL maintainer="[email protected]"
33

44
WORKDIR /app
@@ -18,7 +18,7 @@ RUN yarn workspace @acala-network/evm-subql pack
1818

1919
# =============
2020

21-
FROM subquerynetwork/subql-node-substrate:v3.10.1
21+
FROM onfinality/subql-node:v5.2.9
2222
LABEL maintainer="[email protected]"
2323

2424
# subql node changed defualt user to USER 1000
@@ -29,7 +29,3 @@ RUN tar -xvzf /tmp/package.tgz
2929
RUN mv /package /app
3030
RUN rm -rf /tmp
3131
WORKDIR /app
32-
33-
# has to override entry point for now
34-
# https://github.com/subquery/subql/pull/2344
35-
ENTRYPOINT ["/sbin/tini", "--", "/bin/run"],

packages/evm-subql/docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ services:
3535
retries: 5
3636

3737
subquery-node:
38-
image: subquerynetwork/subql-node-substrate:v3.10.1
38+
image: onfinality/subql-node:v5.2.9
3939
depends_on:
4040
postgres:
4141
condition: service_healthy

packages/evm-subql/package.json

+3-4
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,9 @@
1717
"@acala-network/eth-providers": "workspace:*"
1818
},
1919
"devDependencies": {
20-
"@subql/cli": "~4.5.0",
21-
"@subql/types": "~3.4.0",
22-
"@vercel/ncc": "^0.36.1",
23-
"typescript": "~4.6.3"
20+
"@subql/cli": "~5.3.0",
21+
"@subql/types": "~3.11.0",
22+
"@vercel/ncc": "^0.36.1"
2423
},
2524
"files": [
2625
"dist",

0 commit comments

Comments
 (0)