forked from subquery/subql
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a85511f
commit 0243098
Showing
3 changed files
with
140 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,19 @@ | ||
# production images | ||
FROM node:18 as builder | ||
ARG RELEASE_VERSION | ||
ENTRYPOINT ["subql-node-ethereum"] | ||
RUN npm i -g --unsafe-perm @subql/node-ethereum@${RELEASE_VERSION} | ||
# Build stage | ||
FROM node:18-alpine as builder | ||
WORKDIR /app | ||
COPY ./packages/node ./ | ||
RUN npm install -g --force yarn@latest && \ | ||
yarn pack --filename app.tgz && \ | ||
rm -rf /root/.npm /root/.cache | ||
|
||
# Production stage | ||
FROM node:18-alpine | ||
ENV TZ utc | ||
|
||
RUN apk add --no-cache tini git curl | ||
COPY --from=builder /usr/local/lib/node_modules /usr/local/lib/node_modules | ||
|
||
ENTRYPOINT ["/sbin/tini", "--", "/usr/local/lib/node_modules/@subql/node-ethereum/bin/run"] | ||
CMD ["-f","/app"] | ||
RUN apk add --no-cache tini curl git | ||
COPY --from=builder /app/app.tgz /app.tgz | ||
RUN tar -xzvf /app.tgz --strip 1 && \ | ||
rm /app.tgz && \ | ||
yarn install --production && \ | ||
yarn cache clean && \ | ||
rm -rf /root/.npm /root/.cache | ||
ENTRYPOINT ["/sbin/tini", "--", "bin/run"] | ||
CMD ["-f","/app"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,19 @@ | ||
# production images | ||
FROM node:18 as builder | ||
ARG RELEASE_VERSION | ||
ENTRYPOINT ["subql-node-flare"] | ||
RUN npm i -g --unsafe-perm @subql/node-flare@${RELEASE_VERSION} | ||
# Build stage | ||
FROM node:18-alpine as builder | ||
WORKDIR /app | ||
COPY ./packages/node ./ | ||
RUN npm install -g --force yarn@latest && \ | ||
yarn pack --filename app.tgz && \ | ||
rm -rf /root/.npm /root/.cache | ||
|
||
# Production stage | ||
FROM node:18-alpine | ||
ENV TZ utc | ||
|
||
RUN apk add --no-cache tini git curl | ||
COPY --from=builder /usr/local/lib/node_modules /usr/local/lib/node_modules | ||
|
||
ENTRYPOINT ["/sbin/tini", "--", "/usr/local/lib/node_modules/@subql/node-flare/bin/run"] | ||
CMD ["-f","/app"] | ||
RUN apk add --no-cache tini curl git | ||
COPY --from=builder /app/app.tgz /app.tgz | ||
RUN tar -xzvf /app.tgz --strip 1 && \ | ||
rm /app.tgz && \ | ||
yarn install --production && \ | ||
yarn cache clean && \ | ||
rm -rf /root/.npm /root/.cache | ||
ENTRYPOINT ["/sbin/tini", "--", "bin/run"] | ||
CMD ["-f","/app"] |