Skip to content

Commit

Permalink
Merge branch 'dev' into remove-wc-tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
usame-algan authored Nov 8, 2023
2 parents 18807e9 + af97244 commit 4d28eec
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 12 deletions.
6 changes: 5 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@ Dockerfile
.dockerignore
node_modules
npm-debug.log
README.md
.next
.git
coverage
.DS_Store
.idea
dist

build/
coverage/
cypress/
out/
35 changes: 24 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,34 @@
FROM node:18-alpine
FROM node:18-alpine AS base
ENV NEXT_TELEMETRY_DISABLED 1

FROM base AS builder

RUN apk add --no-cache libc6-compat git python3 py3-pip make g++ libusb-dev eudev-dev linux-headers
WORKDIR /app

# Install dependencies
COPY package.json yarn.lock* ./
RUN yarn --frozen-lockfile
COPY . .
RUN yarn run after-install

# install deps
RUN yarn install --frozen-lockfile
RUN yarn after-install
RUN yarn build

# Production image
FROM base AS runner
WORKDIR /app

ENV NODE_ENV production
ENV REVERSE_PROXY_UI_PORT 8080

# 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 during the build.
ENV NEXT_TELEMETRY_DISABLED 1
RUN addgroup --system --gid 1001 nodejs && adduser --system --uid 1001 nextjs
COPY --from=builder /app/out ./out

# Set the correct permission for prerender cache
RUN mkdir .next && chown nextjs:nodejs .next

EXPOSE 3000
USER nextjs

ENV PORT 3000
EXPOSE ${REVERSE_PROXY_UI_PORT}

CMD ["yarn", "static-serve"]
CMD npx -y serve out -p ${REVERSE_PROXY_UI_PORT}

0 comments on commit 4d28eec

Please sign in to comment.