mirror of
https://github.com/oceanprotocol/ocean-subgraph.git
synced 2024-12-02 05:57:29 +01:00
reduce docker siz (#709)
This commit is contained in:
parent
bc56752f3c
commit
fa58272978
21
Dockerfile
21
Dockerfile
@ -1,9 +1,24 @@
|
||||
FROM node:16
|
||||
|
||||
FROM ubuntu:20.04 as base
|
||||
RUN apt-get update && apt-get -y install bash curl
|
||||
RUN curl -sL https://deb.nodesource.com/setup_16.x -o /tmp/nodesource_setup.sh
|
||||
RUN bash /tmp/nodesource_setup.sh
|
||||
RUN apt install nodejs
|
||||
|
||||
|
||||
|
||||
FROM base as builder
|
||||
RUN apt-get update && apt-get -y install wget
|
||||
COPY package*.json /usr/src/app/
|
||||
WORKDIR /usr/src/app
|
||||
RUN npm install
|
||||
WORKDIR /usr/src/app/
|
||||
ENV NODE_ENV=production
|
||||
RUN npm ci
|
||||
|
||||
|
||||
FROM base as runner
|
||||
ENV NODE_ENV=production
|
||||
COPY . /usr/src/app
|
||||
WORKDIR /usr/src/app/
|
||||
COPY --from=builder /usr/src/app/node_modules/ /usr/src/app/node_modules/
|
||||
ENV DEPLOY_SUBGRAPH=true
|
||||
ENTRYPOINT ["/usr/src/app/docker-entrypoint.sh"]
|
12
package.json
12
package.json
@ -46,8 +46,6 @@
|
||||
"changelog": "auto-changelog -p"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@graphprotocol/graph-cli": "^0.38.0",
|
||||
"@graphprotocol/graph-ts": "^0.30.0",
|
||||
"@types/chai": "^4.3.5",
|
||||
"@types/chai-spies": "^1.0.3",
|
||||
"@types/mocha": "^10.0.1",
|
||||
@ -71,14 +69,16 @@
|
||||
"ts-node": "^10.9.1",
|
||||
"ts-node-dev": "^2.0.0",
|
||||
"ts-node-register": "^1.0.0",
|
||||
"typescript": "^5.0.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"@oceanprotocol/contracts": "^1.1.14",
|
||||
"typescript": "^5.0.4",
|
||||
"@oceanprotocol/lib": "^2.7.0",
|
||||
"cross-fetch": "^3.1.6",
|
||||
"ethereumjs-util": "^7.1.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"@oceanprotocol/contracts": "^1.1.14",
|
||||
"@graphprotocol/graph-cli": "^0.38.0",
|
||||
"@graphprotocol/graph-ts": "^0.30.0"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/oceanprotocol/ocean-subgraph.git"
|
||||
|
Loading…
Reference in New Issue
Block a user