Skip to content

Commit 74c50b9

Browse files
authored
Merge pull request #4 from jeremy-feng/remove-standalone-build
chore: update Docker configuration to fix frontend deployment
2 parents 6855bb6 + 7a8817e commit 74c50b9

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ RUN uv sync --frozen --no-dev
3333
# Stage 3: Production image with minimal runtime
3434
FROM python:3.12-slim AS production
3535

36-
# Install only Node.js runtime (no npm/build tools) and bash
36+
# Install Node.js and bash
3737
RUN apt-get update && \
3838
apt-get install -y curl bash && \
3939
curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
@@ -54,9 +54,10 @@ COPY --from=backend-builder /app/.venv /app/.venv
5454
COPY backend/*.py ./
5555

5656
# Copy built frontend from previous stage
57-
COPY --from=frontend-builder /app/frontend/.next/standalone ./
58-
COPY --from=frontend-builder /app/frontend/.next/static ./.next/static
57+
COPY --from=frontend-builder /app/frontend/.next ./.next
5958
COPY --from=frontend-builder /app/frontend/public ./public
59+
COPY --from=frontend-builder /app/frontend/package.json ./package.json
60+
COPY --from=frontend-builder /app/frontend/node_modules ./node_modules
6061

6162
# Expose ports
6263
EXPOSE 8000 3000
@@ -73,7 +74,7 @@ ENV PYTHONPATH=/app \
7374
RUN echo '#!/bin/bash\n\
7475
uv run uvicorn main:app --host $UVICORN_HOST --port $UVICORN_PORT &\n\
7576
BACKEND_PID=$!\n\
76-
PORT=3000 node server.js &\n\
77+
cd /app && PORT=3000 npx next start &\n\
7778
FRONTEND_PID=$!\n\
7879
wait $BACKEND_PID $FRONTEND_PID' > /app/start.sh && chmod +x /app/start.sh
7980

frontend/next.config.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ const withNextIntl = createNextIntlPlugin('./i18n.ts');
44

55
/** @type {import('next').NextConfig} */
66
const nextConfig = {
7-
output: 'standalone',
87
compiler: {
98
removeConsole:
109
process.env.NODE_ENV === "production"

0 commit comments

Comments
 (0)