-
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
5de414b
commit ed680d6
Showing
5 changed files
with
33 additions
and
62 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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Stage 1: Build the Next.js application | ||
FROM node:18-alpine AS builder | ||
|
||
# Set working directory | ||
WORKDIR /app | ||
|
||
# Copy package.json and install dependencies | ||
COPY package.json ./ | ||
RUN npm install --production --frozen-lockfile | ||
|
||
# Copy application files | ||
COPY . . | ||
|
||
# Build the application | ||
RUN npm run build | ||
|
||
# Stage 2: Run the Next.js application | ||
FROM node:18-alpine | ||
|
||
# Set working directory | ||
WORKDIR /app | ||
|
||
# Copy built files from the builder stage | ||
COPY --from=builder /app ./ | ||
|
||
# Expose the port the app runs on | ||
EXPOSE 3000 | ||
|
||
# Start the application | ||
CMD ["npm", "start"] |
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
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