Skip to content

Commit

Permalink
copy necessary build directories to docker
Browse files Browse the repository at this point in the history
  • Loading branch information
guplersaxanoid committed Oct 26, 2023
1 parent 90b21b8 commit d5791e9
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions packages/node/Dockerfile
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"]

0 comments on commit d5791e9

Please sign in to comment.