Files
Homarr/Dockerfile
2023-09-09 00:46:43 +02:00

25 lines
617 B
Docker

FROM node:20-alpine
WORKDIR /app
ARG PORT=7575
ENV NEXT_TELEMETRY_DISABLED 1
ENV NODE_ENV production
ENV NODE_OPTIONS '--no-experimental-fetch'
COPY next.config.js ./
COPY public ./public
COPY package.json ./package.json
# Automatically leverage output traces to reduce image size
# https://nextjs.org/docs/advanced-features/output-file-tracing
COPY .next/standalone ./
COPY .next/static ./.next/static
EXPOSE $PORT
ENV PORT=${PORT}
HEALTHCHECK --interval=10s --timeout=5s --start-period=5s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost:${PORT} || exit 1
CMD ["node", "server.js"]