Add venture detail pages, CropSphere showcase, and update Dockerfile

This commit is contained in:
R-Bharathraj
2026-10-06 18:38:03 +05:30
parent 1582052c98
commit bebf78cefd
22 changed files with 2026 additions and 153 deletions

View File

@@ -1,5 +1,8 @@
# Node 24 to match local development: package-lock.json written by a local `npm install`
# (npm 11) must also pass `npm ci` here, or the build fails with "lock file out of sync".
# 1. Build Stage
FROM node:22-alpine AS build
FROM node:24-alpine AS build
WORKDIR /app
@@ -7,7 +10,7 @@ WORKDIR /app
COPY package*.json ./
# Install dependencies
RUN npm ci
RUN npm ci --no-audit --no-fund
# Copy source code
COPY . .
@@ -16,17 +19,24 @@ COPY . .
RUN NITRO_PRESET=node-server npm run build
# 2. Production Stage
FROM node:22-alpine
FROM node:24-alpine
WORKDIR /app
# Copy built output from build stage
COPY --from=build /app/.output ./.output
EXPOSE 3000
ENV NODE_ENV=production
ENV PORT=3000
ENV HOST=0.0.0.0
# The Nitro output is self-contained (dependencies are bundled), so nothing else is copied.
COPY --from=build --chown=node:node /app/.output ./.output
# Run as the image's unprivileged user rather than root.
USER node
EXPOSE 3000
# Lets Dokploy/Docker see when the server is actually answering requests.
HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \
CMD wget -qO- http://127.0.0.1:3000/ >/dev/null || exit 1
CMD ["node", ".output/server/index.mjs"]