2023-10-15 01:47:19 +01:00
|
|
|
FROM fascinated/docker-images:node-pnpm-latest
|
2023-07-08 20:49:08 +01:00
|
|
|
|
2023-07-01 20:43:53 +00:00
|
|
|
ENV NODE_ENV=production
|
|
|
|
WORKDIR /usr/src/app
|
2023-07-12 11:21:38 +01:00
|
|
|
|
|
|
|
# Copy package.json and package-lock.json separately to fully utilize Docker layer caching
|
|
|
|
COPY package.json ./
|
2023-10-15 01:46:09 +01:00
|
|
|
COPY pnpm-lock.yaml ./
|
2023-10-15 02:00:26 +01:00
|
|
|
RUN pnpm install --production --silent
|
2023-07-12 11:21:38 +01:00
|
|
|
|
|
|
|
# Opt out of Next.js telemetry
|
2023-07-02 12:05:27 +01:00
|
|
|
RUN npx next telemetry disable
|
|
|
|
|
2023-07-12 11:30:38 +01:00
|
|
|
# Copy the rest of the files
|
|
|
|
COPY . .
|
|
|
|
|
2023-07-12 13:55:48 +01:00
|
|
|
# Environment Variables
|
|
|
|
ENV NODE_ENV=production
|
|
|
|
|
2023-07-12 11:21:38 +01:00
|
|
|
# Expose port 3000
|
|
|
|
EXPOSE 3000
|
|
|
|
|
|
|
|
# Start the app
|
2023-07-12 14:02:33 +01:00
|
|
|
CMD ["bash", "start.sh"]
|