feat: dockerfiles and full docker-compose orchestration
Add multi-stage Dockerfiles for Python services (Dockerfile.service) and React dashboard (Dockerfile.dashboard + nginx.conf). Update docker-compose.yml with all seven application services: news-fetcher, sentiment-analyzer, signal-generator, trade-executor, learning-engine, api-gateway, and dashboard.
This commit is contained in:
parent
e470055354
commit
b255b3edbe
4 changed files with 250 additions and 0 deletions
34
docker/Dockerfile.dashboard
Normal file
34
docker/Dockerfile.dashboard
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
# Multi-stage Dockerfile for the React dashboard.
|
||||
# Stage 1: build the Vite/React app
|
||||
# Stage 2: serve via nginx
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Stage 1: Node build
|
||||
# ---------------------------------------------------------------------------
|
||||
FROM node:20-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY dashboard/package.json dashboard/package-lock.json ./
|
||||
RUN npm ci
|
||||
|
||||
COPY dashboard/ .
|
||||
RUN npm run build
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Stage 2: nginx to serve the static build
|
||||
# ---------------------------------------------------------------------------
|
||||
FROM nginx:alpine
|
||||
|
||||
# Remove default nginx site
|
||||
RUN rm /etc/nginx/conf.d/default.conf
|
||||
|
||||
# Copy custom nginx config
|
||||
COPY docker/nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
# Copy built assets from the builder stage
|
||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue