Fundamental_Analysis/docker/Dockerfile.frontend.prod
Lv, Qi fbb1703b00 feat: fix provider test endpoints and update deployment scripts
- Finnhub: Add missing /test endpoint
- AlphaVantage: Fix test endpoint deserialization (handle null api_url)
- Mock Provider: Add /test endpoint and fix Zodios validation error by adding Mock enum
- Deployment: Remove Mock Provider from production deployment script
- Infrastructure: Add production Dockerfiles and compose configs
2025-12-01 02:00:21 +08:00

25 lines
595 B
Docker

# 1. Build Stage
FROM node:20-slim AS builder
WORKDIR /app
# Environment variables for build time
# ENV NODE_ENV=production <- REMOVED: This causes npm ci to skip devDependencies (tsc, vite)
# These must match the Nginx proxy paths
ENV VITE_API_TARGET=/api
ENV NEXT_PUBLIC_BACKEND_URL=/api/v1
COPY frontend/package.json frontend/package-lock.json ./
RUN npm ci
COPY frontend/ .
RUN npm run build
# 2. Runtime Stage
FROM nginx:alpine
COPY --from=builder /app/dist /usr/share/nginx/html
COPY docker/nginx.prod.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]