Skip to content

Commit

Permalink
fix: ditch new dockerfile altogether
Browse files Browse the repository at this point in the history
  • Loading branch information
noahstreller committed Nov 26, 2024
1 parent 9355a10 commit ad1f175
Showing 1 changed file with 25 additions and 15 deletions.
40 changes: 25 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,35 @@
# Base image
FROM node:18-alpine

RUN apk add --no-cache libc6-compat
FROM node:18-alpine

# Set working directory
RUN apk add --no-cache libc6-compat
WORKDIR /app

# Copy application files and install dependencies, then build the application
COPY / /app

# Install dependencies based on the preferred package manager
COPY / /app
RUN npm ci
RUN npm run build

# Set environment variables
ENV NODE_ENV=production
ENV NEXT_TELEMETRY_DISABLED=1
ENV PORT=3000
ENV HOSTNAME="0.0.0.0"
# Next.js collects completely anonymous telemetry data about general usage.
# Learn more here: https://nextjs.org/telemetry
# Uncomment the following line in case you want to disable telemetry during the build.
# ENV NEXT_TELEMETRY_DISABLED 1

RUN npm run build;




ENV NODE_ENV production
# Uncomment the following line in case you want to disable telemetry during runtime.
ENV NEXT_TELEMETRY_DISABLED 1




# Expose the application port
EXPOSE 3000

# Start the application
CMD ["npm", "start"]
ENV PORT 3000

# server.js is created by next build from the standalone output
# https://nextjs.org/docs/pages/api-reference/next-config-js/output
CMD HOSTNAME="0.0.0.0" npm start

0 comments on commit ad1f175

Please sign in to comment.