Skip to content

Commit

Permalink
Add Docker for website
Browse files Browse the repository at this point in the history
  • Loading branch information
sdepold committed Sep 10, 2023
1 parent 560bda9 commit 957554c
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions web/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM node:18-alpine AS BUILD_IMAGE

ENV NPM_CONFIG_LOGLEVEL warn
ENV NODE_ENV production
ENV PORT 3000

RUN apk update && apk add yarn curl bash python3 g++ make

WORKDIR /srv/app

COPY . .

RUN yarn --frozen-lockfile
RUN yarn build

# Prune dev dependencies
RUN npm prune --production
RUN curl -sf https://gobinaries.com/tj/node-prune | sh

EXPOSE 3000

CMD ["node_modules/.bin/next", "start"]

0 comments on commit 957554c

Please sign in to comment.