File tree Expand file tree Collapse file tree 1 file changed +15
-21
lines changed
Expand file tree Collapse file tree 1 file changed +15
-21
lines changed Original file line number Diff line number Diff line change 1- # Stage 1: Building the code
2- FROM node:20 as builder
1+ FROM node:18-alpine
32
4- WORKDIR /app
5-
6- # Copy package.json and package-lock.json (if available)
7- COPY package*.json ./
8- COPY pnpm*.yaml ./
3+ COPY . /app
94
10- # Install pre-install deps
11- RUN npm install --global pnpm
12- RUN pnpm install
5+ # Set the working directory
6+ WORKDIR /app
137
14- # Copy the code
15- COPY . /app
8+ # Install pnpm
9+ RUN npm install -g pnpm
1610
17- # Set our env vars needed for building it for /blog
18- ENV NEXT_PUBLIC_BASE_URL='/blog'
19- ENV NEXT_PUBLIC_MODE='production'
11+ # By default, use the enterprise theme
12+ ARG THEME=enterprise
2013
21- RUN cd packages/blog-starter-kit/themes/enterprise && \
22- pnpm install
14+ WORKDIR /app/packages/blog-starter-kit/themes/${THEME}
15+ RUN cp .env.example .env.local
16+ RUN pnpm install --frozen-lockfile
2317
24- RUN cd packages/blog-starter-kit/themes/enterprise && \
25- pnpm run build
18+ RUN pnpm build
2619
20+ # Expose the port Next.js runs on
2721EXPOSE 3000
2822
29- ENTRYPOINT [ "/bin/sh" , "-c" , "cd /app/packages/blog-starter-kit/themes/enterprise && /usr/local/bin/pnpm run start" ]
30- # # RUN pnpm dev
23+ # Run the Next.js start script
24+ CMD [ " pnpm" , "start" ]
You can’t perform that action at this time.
0 commit comments