diff --git a/Dockerfile b/Dockerfile index aab3a99..f257a65 100644 --- a/Dockerfile +++ b/Dockerfile @@ -46,13 +46,14 @@ ENV PORT=3000 ENV NODE_ENV=production # Copy standalone output and static files -# Create directory as root first, then copy with chown -RUN mkdir -p /app/.next/cache && chown -R nextjs:nodejs /app/.next/cache - COPY --from=builder --chown=nextjs:nodejs /app/public ./public COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./ COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static +# Ensure the cache directory specifically is writeable (Mintel Standard #16) +# We copy a small directory or just create it via COPY to avoid RUN chown permission issues +COPY --from=builder --chown=nextjs:nodejs /app/.next/cache ./.next/cache + USER nextjs CMD ["node", "server.js"] diff --git a/lib/services/logging/pino-logger-service.ts b/lib/services/logging/pino-logger-service.ts index 8f811d9..6493bdf 100644 --- a/lib/services/logging/pino-logger-service.ts +++ b/lib/services/logging/pino-logger-service.ts @@ -32,48 +32,60 @@ export class PinoLoggerService implements LoggerService { trace(msg: string, ...args: unknown[]) { if (args.length > 0 && typeof args[0] === "object" && args[0] !== null) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any (this.logger as any).trace(args[0] as object, msg, ...args.slice(1)); } else { + // eslint-disable-next-line @typescript-eslint/no-explicit-any (this.logger as any).trace(msg, ...args); } } debug(msg: string, ...args: unknown[]) { if (args.length > 0 && typeof args[0] === "object" && args[0] !== null) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any (this.logger as any).debug(args[0] as object, msg, ...args.slice(1)); } else { + // eslint-disable-next-line @typescript-eslint/no-explicit-any (this.logger as any).debug(msg, ...args); } } info(msg: string, ...args: unknown[]) { if (args.length > 0 && typeof args[0] === "object" && args[0] !== null) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any (this.logger as any).info(args[0] as object, msg, ...args.slice(1)); } else { + // eslint-disable-next-line @typescript-eslint/no-explicit-any (this.logger as any).info(msg, ...args); } } warn(msg: string, ...args: unknown[]) { if (args.length > 0 && typeof args[0] === "object" && args[0] !== null) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any (this.logger as any).warn(args[0] as object, msg, ...args.slice(1)); } else { + // eslint-disable-next-line @typescript-eslint/no-explicit-any (this.logger as any).warn(msg, ...args); } } error(msg: string, ...args: unknown[]) { if (args.length > 0 && typeof args[0] === "object" && args[0] !== null) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any (this.logger as any).error(args[0] as object, msg, ...args.slice(1)); } else { + // eslint-disable-next-line @typescript-eslint/no-explicit-any (this.logger as any).error(msg, ...args); } } fatal(msg: string, ...args: unknown[]) { if (args.length > 0 && typeof args[0] === "object" && args[0] !== null) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any (this.logger as any).fatal(args[0] as object, msg, ...args.slice(1)); } else { + // eslint-disable-next-line @typescript-eslint/no-explicit-any (this.logger as any).fatal(msg, ...args); } }