File tree Expand file tree Collapse file tree 2 files changed +17
-6
lines changed
Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Original file line number Diff line number Diff line change 22# From repository root folder
33# docker build --build-arg ENV=development -t police-data-trust-frontend-dev -f frontend/Dockerfile.cloud ./frontend
44
5- FROM node:20-bookworm-slim as builder
5+ FROM node:20-bookworm-slim AS builder
66
7- WORKDIR /app/
7+ WORKDIR /app
88ARG ENV
99
1010COPY package*.json ./
@@ -14,7 +14,17 @@ COPY . .
1414
1515RUN npm run build:${ENV}
1616
17- FROM nginx:1.27-bookworm
18- COPY --from=builder /app/out /usr/share/nginx/html
19- COPY --from=builder /app/nginx/default.conf /etc/nginx/conf.d/default.conf
20- EXPOSE 80
17+ FROM node:20-bookworm-slim AS runner
18+
19+ WORKDIR /app
20+ ENV NODE_ENV=production
21+ ENV PORT=3000
22+ ENV HOSTNAME=0.0.0.0
23+
24+ COPY --from=builder /app/.next/standalone ./
25+ COPY --from=builder /app/.next/static ./.next/static
26+ COPY --from=builder /app/public ./public
27+
28+ EXPOSE 3000
29+
30+ CMD ["node", "server.js"]
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import type { NextConfig } from "next"
22
33const nextConfig : NextConfig = {
44 /* config options here */
5+ output : "standalone" ,
56}
67
78export default nextConfig
You can’t perform that action at this time.
0 commit comments