gcloud-lab/trading-platform/deploy/dockerfiles/api-gateway.Dockerfile
Sirius Devops d079d1239f 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
2026-05-17 22:15:00 +00:00

26 lines
899 B
Docker

# =============================================================================
# API Gateway Dockerfile — Nginx-based reverse proxy with rate limiting
# =============================================================================
FROM nginx:1.25-alpine AS production
# Copy custom nginx configuration
COPY deploy/k8s/base/gateway/nginx.conf /etc/nginx/nginx.conf
COPY deploy/k8s/base/gateway/conf.d/ /etc/nginx/conf.d/
# Create required directories
RUN mkdir -p /etc/nginx/ssl \
/etc/nginx/conf.d \
/var/cache/nginx \
/var/run/nginx \
/var/log/nginx \
&& touch /var/run/nginx/nginx.pid
# Security: run as nginx user (already exists in alpine image)
USER nginx
EXPOSE 8080 8443
HEALTHCHECK --interval=15s --timeout=3s --start-period=10s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost:8080/health || exit 1
CMD ["nginx", "-g", "daemon off;"]