Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,9 @@ COPY --from=backend-builder /app/.venv /app/.venv
COPY backend/*.py ./

# Copy built frontend from previous stage
COPY --from=frontend-builder /app/frontend/.next ./.next
COPY --from=frontend-builder /app/frontend/public ./public
COPY --from=frontend-builder /app/frontend/package.json ./package.json
COPY --from=frontend-builder /app/frontend/node_modules ./node_modules
COPY --from=frontend-builder /app/frontend/.next/standalone /app/
COPY --from=frontend-builder /app/frontend/public /app/public
COPY --from=frontend-builder /app/frontend/.next/static /app/.next/static

# Expose ports
EXPOSE 8000 3000
Expand All @@ -68,13 +67,14 @@ ENV PYTHONPATH=/app \
UVICORN_PORT=8000 \
PATH="/app/.venv/bin:$PATH" \
VIRTUAL_ENV=/app/.venv \
NODE_ENV=production
NODE_ENV=production \
PORT=3000

# Create startup script for better process management
RUN echo '#!/bin/bash\n\
uv run uvicorn main:app --host $UVICORN_HOST --port $UVICORN_PORT &\n\
BACKEND_PID=$!\n\
cd /app && PORT=3000 npx next start &\n\
node /app/server.js &\n\
FRONTEND_PID=$!\n\
wait $BACKEND_PID $FRONTEND_PID' > /app/start.sh && chmod +x /app/start.sh

Expand Down
1 change: 1 addition & 0 deletions frontend/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const withNextIntl = createNextIntlPlugin('./i18n.ts');

/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'standalone',
compiler: {
removeConsole:
process.env.NODE_ENV === "production"
Expand Down