-
Notifications
You must be signed in to change notification settings - Fork 347
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
copy necessary build directories to docker
- Loading branch information
1 parent
90b21b8
commit d5791e9
Showing
1 changed file
with
13 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,27 @@ | ||
# production images | ||
# Build stage | ||
FROM node:18 as builder | ||
|
||
ENTRYPOINT ["subql-node"] | ||
RUN npm install -g --force yarn@latest | ||
|
||
WORKDIR /app | ||
COPY . . | ||
|
||
# Install dependencies | ||
RUN npm install -g --force yarn@latest | ||
RUN yarn install | ||
# Uncomment the following line if you need to build your application | ||
# RUN yarn build | ||
|
||
# Install TypeScript globally | ||
#RUN npm install -g typescript | ||
|
||
# Build the application | ||
#RUN yarn build | ||
|
||
# Production stage | ||
FROM node:18-alpine | ||
ENV TZ utc | ||
|
||
RUN apk add --no-cache tini git curl | ||
# Copy the built application from the previous stage | ||
COPY --from=builder /app . | ||
|
||
# Adjust the ENTRYPOINT to the location of your application's start script | ||
COPY --from=builder /app/package.json ./ | ||
COPY --from=builder /app/yarn.lock ./ | ||
COPY --from=builder /app/node_modules ./node_modules | ||
# Copy your built files (replace 'dist' with your directory if it's different) | ||
COPY --from=builder /app/dist ./dist | ||
# Copy the bin directory | ||
COPY --from=builder /app/bin ./bin | ||
|
||
ENTRYPOINT ["/sbin/tini", "--", "node", "bin/run"] | ||
CMD ["-f","/app"] |