-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8382795
commit b67aa03
Showing
1 changed file
with
6 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,26 @@ | ||
# Use an official Node.js runtime as a parent image | ||
FROM node:18-alpine | ||
|
||
# Install pnpm globally | ||
RUN npm install -g pnpm | ||
|
||
# Set the working directory inside the container | ||
WORKDIR /app | ||
|
||
# Copy package.json and package-lock.json (or yarn.lock) to the working directory | ||
COPY package*.json ./ | ||
|
||
# Install dependencies | ||
RUN npm ci | ||
RUN pnpm ci | ||
|
||
# Copy the rest of the application code to the working directory | ||
COPY . . | ||
|
||
# Build the Next.js app for production | ||
RUN npm run build | ||
RUN pnpm run build | ||
|
||
# Expose the port on which the app will run | ||
EXPOSE 3000 | ||
|
||
# Start the Next.js app | ||
CMD ["npm", "run", "start"] | ||
CMD ["pnpm", "run", "start"] |