Skip to content

Commit

Permalink
https://github.com/ranisalt/node-argon2/issues/302
Browse files Browse the repository at this point in the history
  • Loading branch information
cateiru committed Jul 19, 2022
1 parent c8dd2e5 commit c961d2b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 17 deletions.
22 changes: 6 additions & 16 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@
# Rebuild the source code only when needed
FROM node:16 AS builder
WORKDIR /app

COPY ./package.json /app/package.json
COPY ./yarn.lock /app/yarn.lock

RUN yarn install --frozen-lockfile --ignore-scripts

COPY . .

RUN yarn install --frozen-lockfile
RUN yarn build

# Production image, copy all the files and run next
Expand All @@ -16,27 +21,12 @@ ENV NODE_ENV production
RUN addgroup -g 1001 -S nodejs
RUN adduser -S nextjs -u 1001

# You only need to copy next.config.js if you are NOT using the default configuration
# COPY --from=builder /app/next.config.js ./
COPY --from=builder /app/public ./public
COPY --from=builder /app/package.json ./package.json

COPY --from=builder /app/node_modules/argon2/lib ./node_modules/argon2/lib

RUN yarn global add node-gyp

# Automatically leverage output traces to reduce image size
# https://nextjs.org/docs/advanced-features/output-file-tracing
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static

USER nextjs

# ENV PORT 3000

# Next.js collects completely anonymous telemetry data about general usage.
# Learn more here: https://nextjs.org/telemetry
# Uncomment the following line in case you want to disable telemetry.
# ENV NEXT_TELEMETRY_DISABLED 1

CMD ["node", "server.js"]
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@emotion/styled": "^11.9.3",
"@fontsource/permanent-marker": "^4.5.5",
"@google-cloud/storage": "^6.2.2",
"argon2": "^0.28.7",
"argon2": "0.27.2",
"axios": "^0.27.2",
"client-hints": "^0.2.2",
"content-type": "^1.0.4",
Expand Down

0 comments on commit c961d2b

Please sign in to comment.