modification du container interface admin

replacé apache par next start
This commit is contained in:
Quentin Roussel
2023-04-12 00:54:25 +02:00
parent 52436ee18d
commit 0e8c27e200
6 changed files with 59 additions and 16 deletions

View File

@@ -0,0 +1,37 @@
FROM node:18-alpine AS deps
RUN apk add --no-cache libc6-compat
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm install --production
FROM node:18-alpine AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
ENV NEXT_TELEMETRY_DISABLED 1
RUN npm run build
FROM node:18-alpine AS runner
WORKDIR /app
ENV NODE_ENV production
ENV NEXT_TELEMETRY_DISABLED 1
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs
#TODO : changer pour prod
# COPY --from=builder --chown=nextjs:nodejs /app/.next ./.next
# COPY --from=builder /app/node_modules ./node_modules
# COPY --from=builder /app/package.json ./package.json
COPY --from=builder --chown=nextjs:nodejs /app .
USER nextjs
ENV PORT 3000
# TODO : a changer en prod
# CMD ["npm", "start"]
CMD ["npm","run", "dev"]

View File

@@ -6,7 +6,6 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"export": "next export",
"lint": "next lint"
},
"dependencies": {