add: Notes app added to my projects

This commit is contained in:
2025-12-06 16:30:30 +03:00
parent 63ff73ab18
commit b629f067f8
11 changed files with 66 additions and 33 deletions

View File

@@ -1,24 +1,18 @@
FROM node:20-slim AS builder
RUN useradd -m appuser
FROM node:20-alpine AS builder
WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
RUN --mount=type=cache,target=/app/.next/cache yarn build
FROM node:20-slim AS runner
FROM node:20-alpine
WORKDIR /app
COPY --from=builder /app ./
USER appuser
COPY package*.json ./
RUN npm install --omit=dev
COPY --from=builder /app/.next ./.next
COPY --from=builder /app/dictionary ./dictionary
COPY --from=builder /app/public ./public
EXPOSE 80
CMD ["yarn", "start", "-p", "80", "-H", "0.0.0.0"]
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
CMD wget -q --spider http://localhost:80/ || exit 1