Files
tm-landing/Dockerfile
T
AmirReza Jamali a6e4e2cf6d feat(build): Migrate from static Nginx to Node.js server
This commit transitions the application from being served as a static site via Nginx to a full Node.js application, likely Next.js.

The Dockerfile has been completely rewritten to use a multi-stage build process:
- A `builder` stage installs dependencies and builds the application.
- A lean `runner` stage copies only the necessary production artifacts and dependencies to run the application server.

The `.drone.yml` configuration has been updated to align with this new build process and to trigger builds on the `develop` branch in addition to `main`.
2025-10-14 16:41:47 +03:30

33 lines
452 B
Docker

FROM node:22.19.0 AS builder
WORKDIR /app
# RUN apk add --no-cache libc6-compat
COPY package*.json ./
RUN npm i
COPY . .
RUN docker build .
#---
FROM node:22.19.0 AS runner
WORKDIR /app
COPY package*.json ./
RUN npm ci --omit=dev
COPY --from=builder /app/.next ./.next
COPY --from=builder /app/public ./public
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/package*.json ./
EXPOSE 3000
CMD ["npm", "start"]