docker config changed

This commit is contained in:
govardhan
2025-06-18 20:43:44 +05:30
parent 0d8130bc81
commit 255700b5db

View File

@ -1,10 +1,9 @@
# Base image for all stages # Base image for all stages
FROM node:20-alpine AS base FROM node:20-alpine AS base
### Dependencies Stage ### ### Dependencies Stage ###
FROM base AS deps FROM base AS deps
# Set a fast and reliable Alpine mirror (mirrors.tuna.tsinghua.edu.cn is globally accessible) # Set a fast and reliable Alpine mirror
# Check if 'git' is needed (only required if package.json has Git-based dependencies) # Check if 'git' is needed (only required if package.json has Git-based dependencies)
RUN echo "https://mirrors.tuna.tsinghua.edu.cn/alpine/v3.22/main" > /etc/apk/repositories && \ RUN echo "https://mirrors.tuna.tsinghua.edu.cn/alpine/v3.22/main" > /etc/apk/repositories && \
echo "https://mirrors.tuna.tsinghua.edu.cn/alpine/v3.22/community" >> /etc/apk/repositories && \ echo "https://mirrors.tuna.tsinghua.edu.cn/alpine/v3.22/community" >> /etc/apk/repositories && \
@ -35,6 +34,8 @@ WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules COPY --from=deps /app/node_modules ./node_modules
# Copy all source files # Copy all source files
COPY . . COPY . .
# Debug: List files in components/research to verify presence
RUN ls -l /app/components/research/
# Build the Next.js application # Build the Next.js application
RUN pnpm build RUN pnpm build
@ -71,4 +72,4 @@ HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \
CMD curl -f http://localhost:3000/health || exit 1 CMD curl -f http://localhost:3000/health || exit 1
# Start the Next.js application # Start the Next.js application
CMD ["node", "server.js"] CMD ["node", "server.js"]