mirror of
https://github.com/stonith404/pingvin-share.git
synced 2024-11-05 07:20:13 +01:00
25 lines
563 B
Docker
25 lines
563 B
Docker
FROM node:18-alpine AS deps
|
|
WORKDIR /opt/app
|
|
|
|
|
|
FROM node:18-alpine AS builder
|
|
ENV NODE_ENV=production
|
|
WORKDIR /opt/app
|
|
COPY . .
|
|
COPY --from=deps /opt/app/node_modules ./node_modules
|
|
RUN npm run build
|
|
|
|
|
|
|
|
FROM node:18-alpine AS runner
|
|
WORKDIR /opt/app
|
|
ENV NODE_ENV=production
|
|
COPY --from=builder /opt/app/next.config.js ./
|
|
COPY --from=builder /opt/app/public ./public
|
|
COPY --from=builder /opt/app/.next ./.next
|
|
COPY --from=builder /opt/app/node_modules ./node_modules
|
|
|
|
RUN npm i -g dotenv-cli
|
|
|
|
EXPOSE 3000
|
|
CMD dotenv -e .env.development node_modules/.bin/next start |