feat: Add deployment infrastructure and documentation

Docker:
- Add production-ready Dockerfiles for all microservices
- Optimize for multi-stage builds and minimal image sizes

Kubernetes:
- Add namespace and service manifests
- Include MongoDB and Redis deployment configurations
- Configure API server and charging engine deployments

Documentation:
- Add comprehensive README with platform overview
- Include technology stack and quick start instructions
- Provide prerequisites and setup guidance
This commit is contained in:
nutcas3
2026-04-03 19:56:33 +03:00
parent b69b7ec087
commit 4dda7e25d8
10 changed files with 595 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
FROM golang:1.26-alpine AS builder
WORKDIR /app
COPY apps/api-server/go.mod apps/api-server/go.sum ./
RUN go mod download
COPY apps/api-server/ ./
RUN CGO_ENABLED=0 GOOS=linux go build -o api-server .
FROM alpine:latest
RUN apk --no-cache add ca-certificates
WORKDIR /root/
COPY --from=builder /app/api-server .
EXPOSE 8000
CMD ["./api-server"]
@@ -0,0 +1,20 @@
FROM golang:1.26-alpine AS builder
WORKDIR /app
COPY apps/carrier-connector/go.mod apps/carrier-connector/go.sum ./
RUN go mod download
COPY apps/carrier-connector/ ./
RUN CGO_ENABLED=0 GOOS=linux go build -o carrier-connector .
FROM alpine:latest
RUN apk --no-cache add ca-certificates
WORKDIR /root/
COPY --from=builder /app/carrier-connector .
CMD ["./carrier-connector"]
@@ -0,0 +1,27 @@
FROM rust:1.94-slim AS builder
WORKDIR /app
RUN apt-get update && apt-get install -y \
pkg-config \
libssl-dev \
&& rm -rf /var/lib/apt/lists/*
COPY Cargo.toml Cargo.lock ./
COPY apps/charging-engine ./apps/charging-engine
RUN cargo build --release --bin charging-engine
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY --from=builder /app/target/release/charging-engine .
EXPOSE 8080
CMD ["./charging-engine"]
@@ -0,0 +1,30 @@
FROM node:22-alpine AS builder
WORKDIR /app
RUN corepack enable
COPY package.json pnpm-workspace.yaml pnpm-lock.yaml ./
COPY apps/web-dashboard ./apps/web-dashboard
RUN pnpm install --frozen-lockfile
RUN pnpm --filter web-dashboard build
FROM node:22-alpine
WORKDIR /app
RUN corepack enable
COPY --from=builder /app/apps/web-dashboard/.next ./apps/web-dashboard/.next
COPY --from=builder /app/apps/web-dashboard/public ./apps/web-dashboard/public
COPY --from=builder /app/apps/web-dashboard/package.json ./apps/web-dashboard/
COPY --from=builder /app/apps/web-dashboard/next.config.js ./apps/web-dashboard/
COPY --from=builder /app/node_modules ./node_modules
WORKDIR /app/apps/web-dashboard
EXPOSE 3000
CMD ["pnpm", "start"]