22 lines
636 B
Plaintext
22 lines
636 B
Plaintext
FROM node:20-alpine AS builder
|
|
WORKDIR /app
|
|
COPY package*.json ./
|
|
RUN npm install
|
|
COPY . .
|
|
RUN npm run build
|
|
|
|
FROM node:20-alpine
|
|
WORKDIR /app
|
|
COPY package*.json ./
|
|
RUN npm install --omit=dev
|
|
COPY --from=builder /app/.next ./.next
|
|
COPY --from=builder --chown=node:node /app/.next/cache ./.next/cache
|
|
COPY --from=builder /app/next.config.mjs ./
|
|
COPY --from=builder /app/dictionary ./dictionary
|
|
COPY --from=builder /app/public ./public
|
|
USER app
|
|
EXPOSE 80
|
|
CMD ["npm", "start", "--", "-p", "80", "-H", "0.0.0.0"]
|
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
|
CMD wget -q --spider http://localhost:80/ || exit 1
|