Skip to content

Commit

Permalink
Dockerfile fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
nheek committed Feb 18, 2024
1 parent 149fd4c commit 626d470
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@ WORKDIR /usr/src/app

# Copy package.json and package-lock.json to the working directory
COPY package*.json ./
COPY next.config.js ./

# Install dependencies
RUN npm install --only=production
RUN npm install

# Copy the rest of the application code to the working directory
COPY . .

# Build the Next.js app
# Build the Next.js application
RUN npm run build

# Stage 2: Production Stage
Expand All @@ -26,5 +25,5 @@ WORKDIR /usr/src/app
# Copy built assets from the build stage
COPY --from=build /usr/src/app .

# Start MySQL server and wait for it to be ready, then run the app
# Start the Next.js application
CMD ["npm", "start"]

0 comments on commit 626d470

Please sign in to comment.