Added build files
This commit is contained in:
parent
aa96bddb19
commit
45eb92068d
48
Dockerfile
Normal file
48
Dockerfile
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
FROM node:21-alpine AS base
|
||||||
|
|
||||||
|
#
|
||||||
|
# MARK: deps
|
||||||
|
#
|
||||||
|
FROM base AS deps
|
||||||
|
RUN apk add --no-cache libc6-compat
|
||||||
|
WORKDIR /app
|
||||||
|
COPY yarn.lock package.json ./
|
||||||
|
RUN yarn install
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# MARK: builder
|
||||||
|
#
|
||||||
|
FROM base AS builder
|
||||||
|
WORKDIR /app
|
||||||
|
COPY --from=deps /app/node_modules ./node_modules
|
||||||
|
COPY . .
|
||||||
|
ENV NEXT_TELEMETRY_DISABLED=1
|
||||||
|
RUN yarn run build && \
|
||||||
|
cp -r public .next/standalone/ && \
|
||||||
|
cp -r .next/static .next/standalone/.next/
|
||||||
|
|
||||||
|
#
|
||||||
|
# MARK: prod
|
||||||
|
#
|
||||||
|
FROM base AS runner
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
ENV NEXT_SHARP_PATH=/app/node_modules/sharp
|
||||||
|
ENV NODE_ENV=production
|
||||||
|
ENV NEXT_TELEMETRY_DISABLED=1
|
||||||
|
RUN addgroup --system --gid 1001 nodejs
|
||||||
|
RUN adduser --system --uid 1001 nextjs
|
||||||
|
|
||||||
|
# Set the correct permission for prerender cache
|
||||||
|
RUN mkdir .next
|
||||||
|
RUN chown nextjs:nodejs .next
|
||||||
|
|
||||||
|
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
|
||||||
|
|
||||||
|
USER nextjs
|
||||||
|
|
||||||
|
EXPOSE 3000
|
||||||
|
ENV PORT=3000
|
||||||
|
ENV HOSTNAME="0.0.0.0"
|
||||||
|
CMD ["node", "server.js"]
|
@ -1,4 +1,8 @@
|
|||||||
/** @type {import('next').NextConfig} */
|
/** @type {import('next').NextConfig} */
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
output: "standalone",
|
||||||
reactStrictMode: true,
|
reactStrictMode: true,
|
||||||
|
experimental: {
|
||||||
|
outputStandalone: true,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
@ -16,11 +16,12 @@
|
|||||||
"@monaco-editor/react": "^4.3.1",
|
"@monaco-editor/react": "^4.3.1",
|
||||||
"chevrotain": "^10.0.0",
|
"chevrotain": "^10.0.0",
|
||||||
"monaco-editor": "^0.30.1",
|
"monaco-editor": "^0.30.1",
|
||||||
"next": "12.0.7",
|
"next": "12.0.8",
|
||||||
"react": "17.0.2",
|
"react": "17.0.2",
|
||||||
"react-dom": "17.0.2",
|
"react-dom": "17.0.2",
|
||||||
"react-mosaic-component": "^5.0.0",
|
"react-mosaic-component": "^5.0.0",
|
||||||
"sass": "^1.49.7"
|
"sass": "^1.49.7",
|
||||||
|
"sharp": "0.32.6"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^27.4.0",
|
"@types/jest": "^27.4.0",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user