Files
the-pet-loft/apps/storefront/next.config.js
ianshaloom 70b728a474
Some checks failed
CI / Lint, Typecheck & Test (push) Successful in 2m7s
Deploy — Staging / Lint, Typecheck & Test (push) Successful in 2m3s
Deploy — Staging / Build & push — admin (push) Failing after 1m8s
Deploy — Staging / Build & push — storefront (push) Failing after 1m5s
Deploy — Staging / Deploy to staging VPS (push) Has been skipped
feat(docker): add Dockerfiles and update next.config.js for admin and storefront applications
- Introduced Dockerfiles for both admin and storefront applications to streamline the build and deployment process using multi-stage builds.
- Configured the Dockerfiles to install dependencies, build the applications, and set up a minimal runtime environment.
- Updated next.config.js for both applications to enable standalone output and set the outputFileTracingRoot for proper file tracing in a monorepo setup.

This commit enhances the containerization of the applications, improving deployment efficiency and reducing image sizes.
2026-03-08 02:02:58 +03:00

28 lines
865 B
JavaScript

/* eslint-disable @typescript-eslint/no-require-imports -- Next.js config commonly uses require */
const path = require("path");
/** @type {import('next').NextConfig} */
const nextConfig = {
output: "standalone",
// Required in a monorepo: tells Next.js to trace files from the repo root
// so the standalone bundle includes files from packages/
outputFileTracingRoot: path.join(__dirname, "../.."),
transpilePackages: ["@repo/convex", "@repo/types", "@repo/utils"],
turbopack: {
root: path.join(__dirname, "..", ".."),
},
images: {
remotePatterns: [
{
protocol: "https",
hostname: "res.cloudinary.com",
pathname: "/**",
},
],
},
// PPR: enable when using Next.js canary. Uncomment and add experimental_ppr to PDP page:
// experimental: { ppr: "incremental" },
};
module.exports = nextConfig;