mohsin-devs commited on
Commit
f020a40
·
1 Parent(s): 0f226f2

Fix: Remove non-existent frontend/public, app, pages dirs from Dockerfile COPY; use src/app structure

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -6
Dockerfile CHANGED
@@ -22,15 +22,17 @@ RUN npm install --legacy-peer-deps --quiet
22
  COPY frontend/package.json frontend/package-lock.json* ./
23
  COPY frontend/next.config.mjs ./
24
  COPY frontend/tsconfig.json ./
25
- COPY frontend/next-env.d.ts ./
26
- COPY frontend/public ./public
 
27
  COPY frontend/src ./src
28
- COPY frontend/app ./app
29
- COPY frontend/pages ./pages
 
30
 
31
  # Verify app layout exists (better failure message in CI/HF logs)
32
- RUN if [ ! -d "app" ] && [ ! -d "src/app" ] && [ ! -d "pages" ]; then \
33
- echo "ERROR: no 'app', 'src/app' or 'pages' directory found in frontend - Next.js requires an 'app' or 'pages' directory"; \
34
  ls -la /frontend || true; \
35
  ls -la /frontend/src || true; \
36
  exit 1; \
 
22
  COPY frontend/package.json frontend/package-lock.json* ./
23
  COPY frontend/next.config.mjs ./
24
  COPY frontend/tsconfig.json ./
25
+ COPY frontend/postcss.config.mjs ./
26
+ COPY frontend/tailwind.config.ts ./
27
+ COPY frontend/components.json ./
28
  COPY frontend/src ./src
29
+
30
+ # Create public dir if it doesn't exist (Next.js requires it for standalone output)
31
+ RUN mkdir -p public
32
 
33
  # Verify app layout exists (better failure message in CI/HF logs)
34
+ RUN if [ ! -d "src/app" ]; then \
35
+ echo "ERROR: no 'src/app' directory found in frontend - Next.js requires an app directory"; \
36
  ls -la /frontend || true; \
37
  ls -la /frontend/src || true; \
38
  exit 1; \