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
.vercel .vercel
.env

@ -1,18 +1,18 @@
FROM node AS deps FROM node:12-alpine AS deps
WORKDIR /app WORKDIR /app
COPY package.json yarn.lock ./ COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile RUN yarn install --frozen-lockfile
FROM node AS builder FROM node:12-alpine AS builder
WORKDIR /app WORKDIR /app
COPY . . COPY . .
COPY --from=deps /app/node_modules ./node_modules COPY --from=deps /app/node_modules ./node_modules
ENV NEXT_TELEMETRY_DISABLED 1; ENV NEXT_TELEMETRY_DISABLED 1;
RUN yarn build && yarn install --production --ignore-scripts --prefer-offline RUN yarn build && yarn install --production --ignore-scripts --prefer-offline
FROM node AS runner FROM node:12-alpine AS runner
WORKDIR /app WORKDIR /app
ENV NODE_ENV production ENV NODE_ENV production

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