-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: ditch new dockerfile altogether
- Loading branch information
1 parent
9355a10
commit ad1f175
Showing
1 changed file
with
25 additions
and
15 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,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 |