730e2d8ca8
- Implemented CertificateGallery component to display certification images in a gallery format. - Created CertificationsSection component to showcase certifications with titles and descriptions. - Enhanced Gallery component to support animations and keyboard navigation. - Introduced Select component for dropdown selection with images. - Added utility functions for API responses and pagination handling. - Implemented localization functions for text and content. - Created a custom hook for detecting clicks outside of a component.
36 lines
933 B
Docker
36 lines
933 B
Docker
FROM node:20-alpine AS base
|
|
WORKDIR /app
|
|
ENV NEXT_TELEMETRY_DISABLED=1
|
|
|
|
FROM base AS deps
|
|
COPY package.json pnpm-lock.yaml ./
|
|
RUN npm config set registry https://hub.megan.ir/npm
|
|
RUN npm i -g pnpm
|
|
RUN pnpm install --frozen-lockfile
|
|
|
|
FROM base AS builder
|
|
COPY --from=deps /app/node_modules ./node_modules
|
|
COPY . .
|
|
RUN npm config set registry https://hub.megan.ir/npm
|
|
RUN npm install -g pnpm
|
|
RUN pnpm build
|
|
|
|
FROM node:20-alpine AS runner
|
|
WORKDIR /app
|
|
ARG PORT=5000
|
|
ENV NODE_ENV=production
|
|
ENV NEXT_TELEMETRY_DISABLED=1
|
|
ENV PORT=$PORT
|
|
|
|
RUN addgroup -S nodejs && adduser -S nextjs -G nodejs
|
|
|
|
COPY --from=builder --chown=nextjs:nodejs /app/public ./public
|
|
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
|
|
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
|
|
|
|
RUN touch /app/contactMessages.json && chown nextjs:nodejs /app/contactMessages.json
|
|
|
|
USER nextjs
|
|
EXPOSE ${PORT}
|
|
CMD ["node", "server.js"]
|