first commit
This commit is contained in:
24
dockerfile
Normal file
24
dockerfile
Normal file
@@ -0,0 +1,24 @@
|
||||
FROM node:20-slim AS builder
|
||||
|
||||
RUN useradd -m appuser
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json yarn.lock ./
|
||||
RUN yarn install --frozen-lockfile
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN --mount=type=cache,target=/app/.next/cache yarn build
|
||||
|
||||
FROM node:20-slim AS runner
|
||||
|
||||
WORKDIR /app
|
||||
COPY --from=builder /app ./
|
||||
|
||||
USER appuser
|
||||
EXPOSE 80
|
||||
|
||||
CMD ["yarn", "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
|
||||
Reference in New Issue
Block a user