Added build files

This commit is contained in:
Mark 2025-01-16 14:36:06 -08:00
parent aa96bddb19
commit 45eb92068d
Signed by: Mark
GPG Key ID: C6D63995FE72FD80
4 changed files with 3105 additions and 2918 deletions

48
Dockerfile Normal file
View 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"]

View File

@ -1,4 +1,8 @@
/** @type {import('next').NextConfig} */
module.exports = {
output: "standalone",
reactStrictMode: true,
experimental: {
outputStandalone: true,
},
};

View File

@ -16,11 +16,12 @@
"@monaco-editor/react": "^4.3.1",
"chevrotain": "^10.0.0",
"monaco-editor": "^0.30.1",
"next": "12.0.7",
"next": "12.0.8",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-mosaic-component": "^5.0.0",
"sass": "^1.49.7"
"sass": "^1.49.7",
"sharp": "0.32.6"
},
"devDependencies": {
"@types/jest": "^27.4.0",

5966
yarn.lock

File diff suppressed because it is too large Load Diff