hope this fixes shit
This commit is contained in:
12
Dockerfile
12
Dockerfile
@@ -1,18 +1,14 @@
|
||||
# Use official Node.js image as base
|
||||
FROM node:18-alpine AS builder
|
||||
|
||||
# Set working directory inside the container
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package.json and package-lock.json first to leverage Docker cache
|
||||
COPY package.json package-lock.json ./
|
||||
|
||||
# Install dependencies
|
||||
RUN npm install --force
|
||||
|
||||
# Copy the rest of the application files
|
||||
COPY . .
|
||||
|
||||
ENV NEXT_PUBLIC_API_URL=https://internal-api.inboxi.ng/api
|
||||
|
||||
# Build the Next.js application
|
||||
RUN npm run build
|
||||
|
||||
@@ -29,11 +25,11 @@ COPY --from=builder /app/package.json /app/package-lock.json ./
|
||||
COPY --from=builder /app/.next ./.next
|
||||
COPY --from=builder /app/node_modules ./node_modules
|
||||
|
||||
# Expose port for Next.js
|
||||
EXPOSE 3000
|
||||
|
||||
# Set environment variable to indicate production mode
|
||||
ENV NODE_ENV=production
|
||||
ENV NEXT_PUBLIC_API_URL=https://internal-api.inboxi.ng/api
|
||||
|
||||
|
||||
# Start Next.js server
|
||||
CMD ["npm", "run", "start"]
|
||||
Reference in New Issue
Block a user