Optimize container size
This commit is contained in:
parent
c93b36c757
commit
d22dcfb464
5 changed files with 14871 additions and 11 deletions
|
@ -22,7 +22,6 @@ next-env.d.ts
|
|||
*.log
|
||||
.machinelogs*.json
|
||||
*-audit.json
|
||||
package-lock.json
|
||||
install/
|
||||
bruno/
|
||||
LICENSE
|
||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -23,7 +23,6 @@ next-env.d.ts
|
|||
.machinelogs*.json
|
||||
*-audit.json
|
||||
migrations
|
||||
package-lock.json
|
||||
tsconfig.tsbuildinfo
|
||||
config/config.yml
|
||||
dist
|
||||
|
|
16
Dockerfile
16
Dockerfile
|
@ -2,9 +2,8 @@ FROM node:20-alpine AS builder
|
|||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json ./
|
||||
|
||||
RUN npm install
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm ci
|
||||
|
||||
COPY . .
|
||||
|
||||
|
@ -14,15 +13,16 @@ RUN npm run build
|
|||
|
||||
FROM node:20-alpine AS runner
|
||||
|
||||
RUN apk add --no-cache curl
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json ./
|
||||
# Curl used for the health checks
|
||||
RUN apk add --no-cache curl
|
||||
|
||||
RUN npm install --omit=dev
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm ci --only=production && npm cache clean --force
|
||||
|
||||
COPY --from=builder /app/.next ./.next
|
||||
COPY --from=builder /app/.next/standalone ./
|
||||
COPY --from=builder /app/.next/static ./.next/static
|
||||
COPY --from=builder /app/dist ./dist
|
||||
COPY --from=builder /app/init ./dist/init
|
||||
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
const nextConfig = {
|
||||
eslint: {
|
||||
ignoreDuringBuilds: true,
|
||||
}
|
||||
},
|
||||
output: "standalone"
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
|
|
14861
package-lock.json
generated
Normal file
14861
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue