Skip to content

Commit

Permalink
Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
lille-morille committed Jan 9, 2025
1 parent 2841c5c commit cec2c7b
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.github
.next
node_modules
.dockerignore
.env
.env.example
.eslintrc.cjs
.gitignore
.docker-compose.yml
Dockerfile
Makefile
next-env.d.ts
prettier.config.js
README.md
36 changes: 36 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
FROM node:current-alpine AS build

RUN apk add openssl

WORKDIR /build

COPY . .

RUN npm install -g pnpm

RUN pnpm i --frozen-lockfile

ENV SKIP_ENV_VALIDATION=1

RUN pnpm build

FROM node:current-alpine AS runner

WORKDIR /app

RUN apk add openssl
# Prisma is used in prod deployment
RUN npm install -g prisma

COPY --from=build /build/.next/standalone ./
RUN rm -f .env
COPY --from=build /build/.next/static ./.next/static/
COPY --from=build /build/prisma ./prisma/
COPY --from=build /build/public ./public/

EXPOSE 3000
ENV PORT=3000

ENV NEXT_TELEMETRY_DISABLED=1

CMD [ "node", "server.js" ]
Empty file added dockerignore
Empty file.

0 comments on commit cec2c7b

Please sign in to comment.