Dockerfile setup and small package.json improvements

This commit is contained in:
2026-02-14 03:04:21 +01:00
parent 4727d796a3
commit d8419db0a5
2 changed files with 27 additions and 4 deletions
+23
View File
@@ -0,0 +1,23 @@
FROM node:20-alpine AS deps
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
FROM node:20-alpine AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN npm run build
FROM node:20-alpine AS runner
WORKDIR /app
ENV NODE_ENV=production
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/.next ./.next
COPY --from=builder /app/public ./public
COPY --from=builder /app/package.json ./package.json
COPY --from=builder /app/next.config.js ./next.config.js
EXPOSE 3000
CMD ["npm", "run", "start"]
+4 -4
View File
@@ -3,10 +3,10 @@
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev --turbopack",
"build": "npm run build:lib && next build",
"postinstall": "npm run ws -- -y",
"ws": "npx --yes next-ws-cli@latest patch"
"build": "next build",
"start": "next start",
"dev": "next dev",
"postinstall": "next-ws patch"
},
"dependencies": {
"@codemirror/lang-go": "^6.0.1",