diff --git a/apps/admin/Dockerfile b/apps/admin/Dockerfile index 9073a34..b0f1fc4 100644 --- a/apps/admin/Dockerfile +++ b/apps/admin/Dockerfile @@ -61,4 +61,4 @@ USER nextjs EXPOSE 3001 -CMD ["node", "server.js"] +CMD ["node", "apps/admin/server.js"] diff --git a/apps/storefront/Dockerfile b/apps/storefront/Dockerfile index 0154b4f..ae6359d 100644 --- a/apps/storefront/Dockerfile +++ b/apps/storefront/Dockerfile @@ -65,8 +65,9 @@ ENV NODE_ENV=production \ # Non-root user for security RUN addgroup -g 1001 -S nodejs && adduser -S nextjs -u 1001 -# standalone output mirrors the monorepo tree, so server.js lands at /app/server.js -# Static files and public/ must be copied separately — they are not in standalone/ +# outputFileTracingRoot is set to the repo root, so the standalone directory mirrors +# the full monorepo tree. server.js lands at apps/storefront/server.js inside +# standalone/, not at the root. Static files and public/ must be copied separately. COPY --from=builder --chown=nextjs:nodejs /app/apps/storefront/.next/standalone ./ COPY --from=builder --chown=nextjs:nodejs /app/apps/storefront/.next/static ./apps/storefront/.next/static COPY --from=builder --chown=nextjs:nodejs /app/apps/storefront/public ./apps/storefront/public @@ -75,4 +76,4 @@ USER nextjs EXPOSE 3000 -CMD ["node", "server.js"] +CMD ["node", "apps/storefront/server.js"]