feat: add trading platform K8s deployment infrastructure
- Add Helm chart with 19 templates (Deployments, Services, Ingress, ConfigMaps, Secrets, NetworkPolicy, cert-manager) - Add Dockerfiles for 4 microservices (dashboard, data-service, execute-service, news-service) - Add CI/CD workflows (build-test, build-push, deploy) - Add raw K8s manifests, per-service Helm charts, and deploy scripts - Add SOPS-encrypted secrets template and config - Configure deployment to customer1 namespace - Include infrastructure components: PostgreSQL, Redis, Kafka
This commit is contained in:
parent
af4cb3d321
commit
d079d1239f
115 changed files with 5917 additions and 0 deletions
10
trading-platform/dockerfiles/dashboard/.dockerignore
Normal file
10
trading-platform/dockerfiles/dashboard/.dockerignore
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
node_modules/
|
||||
.next/
|
||||
out/
|
||||
dist/
|
||||
.env*
|
||||
.git/
|
||||
.vscode/
|
||||
coverage/
|
||||
.idea/
|
||||
*.log
|
||||
31
trading-platform/dockerfiles/dashboard/Dockerfile
Normal file
31
trading-platform/dockerfiles/dashboard/Dockerfile
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
# Multi-stage build for Next.js dashboard
|
||||
# ---- Builder ----
|
||||
FROM node:20-alpine AS builder
|
||||
WORKDIR /app
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm ci
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
# ---- Production ----
|
||||
FROM node:20-alpine AS runner
|
||||
ENV NODE_ENV=production
|
||||
|
||||
RUN addgroup --system --gid 1001 nodejs
|
||||
RUN adduser --system --uid 1001 nextjs
|
||||
|
||||
WORKDIR /app
|
||||
COPY --from=builder /app/public ./public
|
||||
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
|
||||
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
|
||||
|
||||
USER nextjs
|
||||
|
||||
EXPOSE 3000
|
||||
ENV PORT=3000
|
||||
ENV HOSTNAME="0.0.0.0"
|
||||
|
||||
HEALTHCHECK --interval=15s --timeout=5s --start-period=20s --retries=3 \\
|
||||
CMD wget --no-verbose --tries=1 --spider http://localhost:${PORT}/ || exit 1
|
||||
|
||||
CMD ["node", "server.js"]
|
||||
Loading…
Reference in a new issue