Docker support

dependabot/npm_and_yarn/typescript-eslint/parser-4.33.0
guusvanmeerveld 3 years ago
parent d1ffc3dff7
commit 46db5d1fd1

2
.gitignore vendored

@ -32,3 +32,5 @@ yarn-error.log*
# vercel
.vercel
.env

@ -1,18 +1,18 @@
FROM node AS deps
FROM node:12-alpine AS deps
WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile
FROM node AS builder
FROM node:12-alpine AS builder
WORKDIR /app
COPY . .
COPY --from=deps /app/node_modules ./node_modules
ENV NEXT_TELEMETRY_DISABLED 1;
RUN yarn build && yarn install --production --ignore-scripts --prefer-offline
FROM node AS runner
FROM node:12-alpine AS runner
WORKDIR /app
ENV NODE_ENV production
@ -30,4 +30,4 @@ USER nextjs
EXPOSE 3000
CMD ["yarn", "start"]
CMD ["yarn", "start"]

@ -0,0 +1,12 @@
version: '3'
services:
app:
container_name: portfolio
build: .
env_file: .env
networks:
default:
external:
name: nginx
Loading…
Cancel
Save