Skip to content

Fix frontend production deployment and health check port#11

Open
BrandonS7 wants to merge 1 commit intoBirmingham-AI:mainfrom
BrandonS7:fix/deployment
Open

Fix frontend production deployment and health check port#11
BrandonS7 wants to merge 1 commit intoBirmingham-AI:mainfrom
BrandonS7:fix/deployment

Conversation

@BrandonS7
Copy link
Copy Markdown

What this does

1. Frontend Dockerfile - production build

The current Dockerfile runs npm run dev (Vite dev server) in production. This exposes source maps, hot module replacement, and dev tooling to the public internet.

Replaced with a proper multi-stage build:

  • Build stage: npm ci + npm run build on Node 20 Alpine
  • Runtime stage: Serves static dist/ via Nginx Alpine

Added frontend/nginx.conf with SPA routing (try_files fallback to index.html) and long-lived cache headers for static assets.

2. Health check port fix

The docker-compose.yml health check was probing localhost:8001 but the backend listens on port 8000. Fixed to match the actual application port.

3. Compose cleanup

  • Updated frontend port mapping from 5174:5173 to 5174:8080 (Nginx)
  • Removed dev hot-reload volume mount (not applicable with production build)

Minimal changes, no backend modifications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant