Commit
·
64ea851
1
Parent(s):
371ff98
..
Browse files- Dockerfile +5 -6
- frontend/next.config.ts +2 -0
Dockerfile
CHANGED
|
@@ -45,12 +45,11 @@ COPY config.py .
|
|
| 45 |
COPY services/ ./services/
|
| 46 |
COPY data/ ./data/
|
| 47 |
|
| 48 |
-
# Copy frontend build from previous stage
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
RUN npm ci --only=production
|
| 54 |
|
| 55 |
# Go back to app root
|
| 56 |
WORKDIR /app
|
|
|
|
| 45 |
COPY services/ ./services/
|
| 46 |
COPY data/ ./data/
|
| 47 |
|
| 48 |
+
# Copy frontend standalone build from previous stage
|
| 49 |
+
# Standalone mode includes all necessary dependencies
|
| 50 |
+
COPY --from=frontend-builder /app/frontend/.next/standalone ./frontend
|
| 51 |
+
COPY --from=frontend-builder /app/frontend/.next/static ./frontend/.next/static
|
| 52 |
+
COPY --from=frontend-builder /app/frontend/public ./frontend/public
|
|
|
|
| 53 |
|
| 54 |
# Go back to app root
|
| 55 |
WORKDIR /app
|
frontend/next.config.ts
CHANGED
|
@@ -7,6 +7,8 @@ const nextConfig: NextConfig = {
|
|
| 7 |
// This helps with module resolution in monorepos
|
| 8 |
},
|
| 9 |
|
|
|
|
|
|
|
| 10 |
|
| 11 |
// Image optimization
|
| 12 |
images: {
|
|
|
|
| 7 |
// This helps with module resolution in monorepos
|
| 8 |
},
|
| 9 |
|
| 10 |
+
// Standalone output for Docker deployment
|
| 11 |
+
output: 'standalone',
|
| 12 |
|
| 13 |
// Image optimization
|
| 14 |
images: {
|